<!doctype html>
<html lang="ru" data-bs-theme="dark">

<head>
    <!-- 2024-05-11 08:54:52 -->
        <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>git read-tree</title>
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css" integrity="sha512-jnSuA4Ss2PkkikSOLtYs8BlYIeeIK1h99ty4YfvRPAlzr377vr3CXDb7sb7eEEBYjDtcYj+AjBH3FLv5uSJuXg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.11.3/font/bootstrap-icons.min.css" integrity="sha512-dPXYcDub/aeb08c63jRq/k6GaKccl256JQy/AnOq7CAnEZ9FzSL9wSbcZkMp4R26vBsMLFYH4kQ67/bbV8XaCQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css" integrity="sha512-rO+olRTkcf304DQBxSWxln8JXCzTHlKnIdnMUwYvQa9/Jd4cQaNkItIUj6Z4nvW1dqK0SKXLbn9h4KwZTNtAyw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/7.1.0/css/flag-icons.min.css" integrity="sha512-bZBu2H0+FGFz/stDN/L0k8J0G8qVsAL0ht1qg5kTwtAheiXwiRKyCq1frwfbSFSJN3jooR5kauE0YjtPzhZtJQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link href="../../../runebook.css" rel="stylesheet" type="text/css">
    <meta name="x-github" content="https://github.com/runebookdev/runebook">
            <meta name="x-i18n-doc" content="git">
        <script>
        function i18n(element) {
            // NOP
        }
    </script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/3.0.5/js.cookie.js" integrity="sha512-F/dia2jKME12jwqiYDayeD+Rr/8jTWUD2wfbuJB0bzSwenSEnXsn4qQ/wVyXUCix5bmCAj8xJdtFr2OqUtjLAw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.bundle.min.js" integrity="sha512-7Pi/otdlbbCR+LnW+F7PwFcSDJOuUJB3OxtEHbg4vSMvzvJjde4Po1v4BR9Gdc9aXNUNFVUY+SK51wWT8WF0Gg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/7.8.1/rxjs.umd.min.js" integrity="sha512-D9LDs8YUUVa4V9Gl4Zb+xqRAc7RCzooR3+zzebgK2RMu/KU+dh90pbjEEMzPiSyRSGbSp9j1pZnrO4joGa5WEg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js" integrity="sha512-mhbv5DqBMgrWL+32MmsDOt/OAvqr/cHimk6B8y/bx/xS88MVkYGPiVv2ixKVrkywF2qHplNRUvFsAHUdxZ3Krg==" crossorigin="anonymous"></script>
    <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6424571640879890" crossorigin="anonymous"></script>    <script async src="https://www.googletagmanager.com/gtag/js?id=G-3G5BZ1QEDP"></script>
<script>
    window.dataLayer = window.dataLayer || [];

    function gtag() {
        dataLayer.push(arguments);
    }

    gtag('js', new Date());
    gtag('config', 'G-3G5BZ1QEDP');
</script>    <script>
(function(c, l, a, r, i, t, y) {
    c[a] = c[a] || function() {
        (c[a].q = c[a].q || []).push(arguments)
    };
    t = l.createElement(r);
    t.async = 1;
    t.src = "https://www.clarity.ms/tag/" + i + "?ref=bwt";
    y = l.getElementsByTagName(r)[0];
    y.parentNode.insertBefore(t, y);
})(window, document, "clarity", "script", "jto2hd94r9");
</script>    <script src="../../../theme.js"></script>
</head>

<body>
    <header class="bg-black">
        <div class="container">
            <div class="row">
                <div class="col">
                    <nav class="navbar navbar-expand-lg navbar-dark">
                        <a class="navbar-brand fw-bold" href="https://runebook.dev/ru">
                            <img alt="Runebook.dev" class="d-inline-block align-top mr-1" src="../../../assets/runebook_logo.webp" width="24" height="24">
                            Runebook.dev
                        </a>
                        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                            <span class="navbar-toggler-icon"></span>
                        </button>
                        <div class="collapse navbar-collapse" id="navbarSupportedContent">
                            <ul class="navbar-nav me-auto mb-2 mb-lg-0">
                                <li class="nav-item">
                                    <a class="nav-link" href="https://runebook.dev/ru#docs">Documentation</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="https://runebook.dev/contributors">Contributors</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="https://github.com/runebookdev/runebook/issues">GitHub</a>
                                </li>
                            </ul>
                                                                                                <button class="btn btn-success ms-2" id="showPopupButton">
                                        <i class="bi bi-translate"></i>
                                        Show English
                                    </button>
                                                                                        <div class="form-check form-switch ms-3">
                                <label class="text-light">
                                    <input class="form-check-input" type="checkbox" role="switch" id="theme-switch" checked>
                                    <i class="bi bi-moon-stars-fill"></i>
                                </label>
                            </div>
                        </div>
                    </nav>
                </div>
            </div>
        </div>
    </header>

    <!--sse-->
    <div class="container">
    <div class="row">
        <div class="col">
            <nav aria-label="breadcrumb" class="mt-2">
                <ol class="breadcrumb mb-1">
                    <li class="breadcrumb-item">
                        <a href="https://runebook.dev/ru#docs">
                            <span class="fi fi-ru"></span>                            Русский                        </a>
                    </li>
                    <li class="breadcrumb-item">
                        <a href="-index-.html">
                            Git                            2.43                        </a>
                    </li>
                                            <li class="breadcrumb-item">
                            <a href="-index-.html#Plumbing_Commands">
                                Plumbing Commands                            </a>
                        </li>
                                    </ol>
            </nav>
        </div>
    </div>
    <br>

    <div class="row">
        <div class="col-md-9">
            <main>
                <article>

                    
                    <h1 class="text-body-emphasis" ><span data-i18n="85f10ced803b883a6bf293a7a7c8c556a8ce6512bce28cb6a118545ec68121a5/b2" data-source="git-read-tree" onmousemove="i18n(this)">git-read-tree</span></h1> <h2 class="text-body-emphasis"  id="_name"><span data-i18n="dcd1d5223f73b3a965c07e3ff5dbee3eedcfedb806686a05b9b3868a2c3d6d50/3a" data-source="Name" onmousemove="i18n(this)">Name</span></h2> <div> <p><span data-i18n="7e9885ebd3c8c5a9eae73ae6b34e8213f1a7db8d7f5a2061e66e8de434242696/07" data-source="git-read-tree - Reads tree information into the index" onmousemove="i18n(this)">git-read-tree &mdash; &scy;&chcy;&icy;&tcy;&ycy;&vcy;&acy;&iecy;&tcy; &icy;&ncy;&fcy;&ocy;&rcy;&mcy;&acy;&tscy;&icy;&yucy; &ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy; &vcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;</span></p> </div> <h2 class="text-body-emphasis"  id="_synopsis"><span data-i18n="8eb3755381519d7f0479d75446e56e20084834c0460d7ec94926932372ea6c47/0d" data-source="Synopsis" onmousemove="i18n(this)">Synopsis</span></h2> <div> <div> <pre class="hljs language-xml">git read-tree [(-m [--trivial] [--aggressive] | --reset | --prefix=<span class="hljs-tag">&lt;<span class="hljs-name">prefix</span>&gt;</span>)
                [-u | -i]] [--index-output=<span class="hljs-tag">&lt;<span class="hljs-name">file</span>&gt;</span>] [--no-sparse-checkout]
                (--empty | <span class="hljs-tag">&lt;<span class="hljs-name">tree-ish1</span>&gt;</span> [<span class="hljs-tag">&lt;<span class="hljs-name">tree-ish2</span>&gt;</span> [<span class="hljs-tag">&lt;<span class="hljs-name">tree-ish3</span>&gt;</span>]])</pre> </div> </div> <h2 class="text-body-emphasis"  id="_description"><span data-i18n="526e0087cc3f254d9f86f6c7d8e23d954c4dfda2b312efc29194ae8a860106ba/d3" data-source="Description" onmousemove="i18n(this)">Description</span></h2> <div> <p><span data-i18n="22d1337c15876454befdf181135ba126afa006e96db6e30bf0a64be57d9b4f24/8d" data-source="Reads the tree information given by &amp;lt;tree-ish&amp;gt; into the index, but does not actually &lt;strong&gt;update&lt;/strong&gt; any of the files it &amp;quot;caches&amp;quot;. (see: &lt;a href=&quot;git-checkout-index&quot;&gt;git-checkout-index[1]&lt;/a&gt;)" onmousemove="i18n(this)">&Scy;&chcy;&icy;&tcy;&ycy;&vcy;&acy;&iecy;&tcy; &icy;&ncy;&fcy;&ocy;&rcy;&mcy;&acy;&tscy;&icy;&yucy; &ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy;, &zcy;&acy;&dcy;&acy;&ncy;&ncy;&ucy;&yucy; &lt;tree-ish&gt;, &vcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;, &ncy;&ocy; &fcy;&acy;&kcy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&icy; &ncy;&iecy; &ocy;&bcy;&ncy;&ocy;&vcy;&lcy;&yacy;&iecy;&tcy; &ncy;&icy; &ocy;&dcy;&icy;&ncy; &icy;&zcy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy;.  &quot;caches&quot; . (&scy;&mcy;.:  <a href="git-checkout-index.html">git-checkout-index[1]</a> )</span></p> <p><span data-i18n="834dcdd105c5bdbe1b08d97ffea880de0fe6f91a09c58e73a152c0cfeb0b1b42/2f" data-source="Optionally, it can merge a tree into the index, perform a fast-forward (i.e. 2-way) merge, or a 3-way merge, with the &lt;code&gt;-m&lt;/code&gt; flag. When used with &lt;code&gt;-m&lt;/code&gt;, the &lt;code&gt;-u&lt;/code&gt; flag causes it to also update the files in the work tree with the result of the merge." onmousemove="i18n(this)">&Pcy;&rcy;&icy; &zhcy;&iecy;&lcy;&acy;&ncy;&icy;&icy; &ocy;&ncy; &mcy;&ocy;&zhcy;&iecy;&tcy; &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&icy;&tcy;&softcy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &scy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ocy;&mcy;, &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&softcy; &ucy;&scy;&kcy;&ocy;&rcy;&iecy;&ncy;&ncy;&ocy;&iecy; (&tcy;. &iecy;. &dcy;&vcy;&ucy;&khcy;&scy;&tcy;&ocy;&rcy;&ocy;&ncy;&ncy;&iecy;&iecy;) &icy;&lcy;&icy; &tcy;&rcy;&iecy;&khcy;&scy;&tcy;&ocy;&rcy;&ocy;&ncy;&ncy;&iecy;&iecy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy; &fcy;&lcy;&acy;&gcy;&acy;  <code>-m</code> . &Pcy;&rcy;&icy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&icy; &scy;  <code>-m</code>  &fcy;&lcy;&acy;&gcy;  <code>-u</code>  &zcy;&acy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&iecy;&tcy; &iecy;&gcy;&ocy; &tcy;&acy;&kcy;&zhcy;&iecy; &ocy;&bcy;&ncy;&ocy;&vcy;&lcy;&yacy;&tcy;&softcy; &fcy;&acy;&jcy;&lcy;&ycy; &vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy; &scy; &rcy;&iecy;&zcy;&ucy;&lcy;&softcy;&tcy;&acy;&tcy;&ocy;&mcy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy;.</span></p> <p><span data-i18n="1a7d264838781509c648b0c4456a97c2688eaea818b1f70862a0225424a40d09/6e" data-source="Only trivial merges are done by &lt;code&gt;git read-tree&lt;/code&gt; itself. Only conflicting paths will be in an unmerged state when &lt;code&gt;git read-tree&lt;/code&gt; returns." onmousemove="i18n(this)">&Tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &tcy;&rcy;&icy;&vcy;&icy;&acy;&lcy;&softcy;&ncy;&ycy;&iecy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&yacy;&yucy;&tcy;&scy;&yacy; &scy;&acy;&mcy;&icy;&mcy;  <code>git read-tree</code> . &Tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &kcy;&ocy;&ncy;&fcy;&lcy;&icy;&kcy;&tcy;&ucy;&yucy;&shchcy;&icy;&iecy; &pcy;&ucy;&tcy;&icy; &bcy;&ucy;&dcy;&ucy;&tcy; &vcy; &ncy;&iecy;&scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ocy;&mcy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&icy; &pcy;&rcy;&icy; &vcy;&ocy;&zcy;&vcy;&rcy;&acy;&shchcy;&iecy;&ncy;&icy;&icy;  <code>git read-tree</code> .</span></p> </div> <h2 class="text-body-emphasis"  id="_options"><span data-i18n="d0db8b5e364b6989e4b8f38a2b3846b87d99a51c1592ebf35d21cc66405a8e39/b6" data-source="Options" onmousemove="i18n(this)">Options</span></h2> <div> <div> <dl> <dt id="Documentation/git-read-tree.txt--m"><span data-i18n="c4e153afb4aeaa5818fb08325ebff59f883a0482006aa3cc1c17c9b393e54efa/11" data-source="-m" onmousemove="i18n(this)">-m</span></dt> <dd> <p><span data-i18n="be1692745f2433b9583b6156ea7f67dca4c83ee1bccbd3e5445e9f260aef9352/69" data-source="Perform a merge, not just a read. The command will refuse to run if your index file has unmerged entries, indicating that you have not finished a previous merge you started." onmousemove="i18n(this)">&Vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&iecy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy;, &acy; &ncy;&iecy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &chcy;&tcy;&iecy;&ncy;&icy;&iecy;. &Kcy;&ocy;&mcy;&acy;&ncy;&dcy;&acy; &ocy;&tcy;&kcy;&acy;&zhcy;&iecy;&tcy;&scy;&yacy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;&acy;&tcy;&softcy;&scy;&yacy;, &iecy;&scy;&lcy;&icy; &vcy; &vcy;&acy;&shcy;&iecy;&mcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ocy;&mcy; &fcy;&acy;&jcy;&lcy;&iecy; &iecy;&scy;&tcy;&softcy; &ncy;&iecy;&scy;&lcy;&icy;&tcy;&ycy;&iecy; &zcy;&acy;&pcy;&icy;&scy;&icy;, &chcy;&tcy;&ocy; &ucy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy; &ncy;&acy; &tcy;&ocy;, &chcy;&tcy;&ocy; &vcy;&ycy; &ncy;&iecy; &zcy;&acy;&vcy;&iecy;&rcy;&shcy;&icy;&lcy;&icy; &pcy;&rcy;&iecy;&dcy;&ycy;&dcy;&ucy;&shchcy;&iecy;&iecy; &ncy;&acy;&chcy;&acy;&tcy;&ocy;&iecy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy;.</span></p> </dd> <dt id="Documentation/git-read-tree.txt---reset"><span data-i18n="ac56537f9761a1ee4d4c501e5dd1901ac41fa8db5e101f2efff023f48e8c56d1/59" data-source="--reset" onmousemove="i18n(this)">--reset</span></dt> <dd> <p><span data-i18n="8dfc7715d000020b63a55ff039ea24f58dfb8b87535acfff3d9578b217dde0e9/6e" data-source="Same as -m, except that unmerged entries are discarded instead of failing. When used with &lt;code&gt;-u&lt;/code&gt;, updates leading to loss of working tree changes or untracked files or directories will not abort the operation." onmousemove="i18n(this)">&Tcy;&ocy; &zhcy;&iecy;, &chcy;&tcy;&ocy; &icy; -m, &zcy;&acy; &icy;&scy;&kcy;&lcy;&yucy;&chcy;&iecy;&ncy;&icy;&iecy;&mcy; &tcy;&ocy;&gcy;&ocy;, &chcy;&tcy;&ocy; &ncy;&iecy;&ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&iocy;&ncy;&ncy;&ycy;&iecy; &zcy;&acy;&pcy;&icy;&scy;&icy; &ocy;&tcy;&bcy;&rcy;&acy;&scy;&ycy;&vcy;&acy;&yucy;&tcy;&scy;&yacy;, &acy; &ncy;&iecy; &vcy;&ycy;&dcy;&acy;&yucy;&tcy;&scy;&yacy; &ncy;&iecy;&ucy;&dcy;&acy;&chcy;&ncy;&ocy;. &Pcy;&rcy;&icy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&icy; &scy;  <code>-u</code>  &ocy;&bcy;&ncy;&ocy;&vcy;&lcy;&iecy;&ncy;&icy;&yacy;, &pcy;&rcy;&icy;&vcy;&ocy;&dcy;&yacy;&shchcy;&icy;&iecy; &kcy; &pcy;&ocy;&tcy;&iecy;&rcy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&jcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &icy;&lcy;&icy; &ncy;&iecy;&ocy;&tcy;&scy;&lcy;&iecy;&zhcy;&icy;&vcy;&acy;&iecy;&mcy;&ycy;&mcy; &fcy;&acy;&jcy;&lcy;&acy;&mcy; &icy;&lcy;&icy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&acy;&mcy;, &ncy;&iecy; &pcy;&rcy;&iecy;&rcy;&ycy;&vcy;&acy;&yucy;&tcy; &ocy;&pcy;&iecy;&rcy;&acy;&tscy;&icy;&yucy;.</span></p> </dd> <dt id="Documentation/git-read-tree.txt--u"><span data-i18n="99f14531f2599afdb9ace38c18c10740fd29ca1bdcdb7d0460fd799001d567bd/0f" data-source="-u" onmousemove="i18n(this)">-u</span></dt> <dd> <p><span data-i18n="9f25f0a44b8190c859461b96496ea3add53643a9b10a52eacc224aa59c384c4e/fb" data-source="After a successful merge, update the files in the work tree with the result of the merge." onmousemove="i18n(this)">&Pcy;&ocy;&scy;&lcy;&iecy; &ucy;&scy;&pcy;&iecy;&shcy;&ncy;&ocy;&gcy;&ocy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy; &ocy;&bcy;&ncy;&ocy;&vcy;&icy;&tcy;&iecy; &fcy;&acy;&jcy;&lcy;&ycy; &vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy; &scy; &rcy;&iecy;&zcy;&ucy;&lcy;&softcy;&tcy;&acy;&tcy;&ocy;&mcy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy;.</span></p> </dd> <dt id="Documentation/git-read-tree.txt--i"><span data-i18n="444c8974fcf3d4d990db382d0a6ed1d69ffc4caa10da28afd7ab561fd7f27ced/9f" data-source="-i" onmousemove="i18n(this)">-i</span></dt> <dd> <p><span data-i18n="8323cdd98b6984a1118cf732842dad05cbe3f19023614c6a776300fc08428908/87" data-source="Usually a merge requires the index file as well as the files in the working tree to be up to date with the current head commit, in order not to lose local changes. This flag disables the check with the working tree and is meant to be used when creating a merge of trees that are not directly related to the current working tree status into a temporary index file." onmousemove="i18n(this)">&Ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &dcy;&lcy;&yacy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy; &tcy;&rcy;&iecy;&bcy;&ucy;&iecy;&tcy;&scy;&yacy;, &chcy;&tcy;&ocy;&bcy;&ycy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ycy;&jcy; &fcy;&acy;&jcy;&lcy;, &acy; &tcy;&acy;&kcy;&zhcy;&iecy; &fcy;&acy;&jcy;&lcy;&ycy; &vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy; &bcy;&ycy;&lcy;&icy; &ocy;&bcy;&ncy;&ocy;&vcy;&lcy;&iecy;&ncy;&ycy; &dcy;&ocy; &tcy;&iecy;&kcy;&ucy;&shchcy;&iecy;&jcy; &gcy;&ocy;&lcy;&ocy;&vcy;&ncy;&ocy;&jcy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy;, &chcy;&tcy;&ocy;&bcy;&ycy; &ncy;&iecy; &pcy;&ocy;&tcy;&iecy;&rcy;&yacy;&tcy;&softcy; &lcy;&ocy;&kcy;&acy;&lcy;&softcy;&ncy;&ycy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy;. &Ecy;&tcy;&ocy;&tcy; &fcy;&lcy;&acy;&gcy; &ocy;&tcy;&kcy;&lcy;&yucy;&chcy;&acy;&iecy;&tcy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&kcy;&ucy; &scy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;&mcy; &icy; &pcy;&rcy;&iecy;&dcy;&ncy;&acy;&zcy;&ncy;&acy;&chcy;&iecy;&ncy; &dcy;&lcy;&yacy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&yacy; &pcy;&rcy;&icy; &scy;&ocy;&zcy;&dcy;&acy;&ncy;&icy;&icy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&iecy;&vcy;, &ncy;&iecy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ycy;&khcy; &ncy;&acy;&pcy;&rcy;&yacy;&mcy;&ucy;&yucy; &scy; &tcy;&iecy;&kcy;&ucy;&shchcy;&icy;&mcy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&iecy;&mcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;, &vcy;&ocy; &vcy;&rcy;&iecy;&mcy;&iecy;&ncy;&ncy;&ycy;&jcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ycy;&jcy; &fcy;&acy;&jcy;&lcy;.</span></p> </dd> <dt id="Documentation/git-read-tree.txt--n"><span data-i18n="5249f4fcc629efa0e6d6b2bf746b6c5de61611ce719ad61ac820fbe5c8cece66/28" data-source="-n" onmousemove="i18n(this)">-n</span></dt> <dt id="Documentation/git-read-tree.txt---dry-run"><span data-i18n="675ca48430023bf861e914e0cf5bbe183efe84bd9d831affc574394bf4edc690/c1" data-source="--dry-run" onmousemove="i18n(this)">--dry-run</span></dt> <dd> <p><span data-i18n="6fcc4f8501c799c300f1dec5287682baf4030293f97d983ab16717ba1b73f726/0f" data-source="Check if the command would error out, without updating the index or the files in the working tree for real." onmousemove="i18n(this)">&Pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&softcy;&tcy;&iecy;, &ncy;&iecy; &vcy;&ycy;&dcy;&acy;&scy;&tcy; &lcy;&icy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&acy; &ocy;&shcy;&icy;&bcy;&kcy;&ucy; &bcy;&iecy;&zcy; &rcy;&iecy;&acy;&lcy;&softcy;&ncy;&ocy;&gcy;&ocy; &ocy;&bcy;&ncy;&ocy;&vcy;&lcy;&iecy;&ncy;&icy;&yacy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy; &icy;&lcy;&icy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy; &vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy;.</span></p> </dd> <dt id="Documentation/git-read-tree.txt--v"><span data-i18n="81c36ccd44ef18baabad6e2d87038b72d606263bd6a3432b964a872023654fff/7c" data-source="-v" onmousemove="i18n(this)">-v</span></dt> <dd> <p><span data-i18n="92a5410954af1c1a1a17336005edab50ea8f1c4df598c5198d7b39989cb43f99/ed" data-source="Show the progress of checking files out." onmousemove="i18n(this)">&Pcy;&ocy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&tcy;&softcy; &khcy;&ocy;&dcy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;&icy;&yacy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy;.</span></p> </dd> <dt id="Documentation/git-read-tree.txt---trivial"><span data-i18n="41fc499538be917640266645336c94af8e91df08213a3521fc0e801c8b0f71c4/26" data-source="--trivial" onmousemove="i18n(this)">--trivial</span></dt> <dd> <p><span data-i18n="f9daf042b828586322fbea8eb7bbb8199ca120d47357b410274e98fdb439c61d/06" data-source="Restrict three-way merge by &lt;code&gt;git read-tree&lt;/code&gt; to happen only if there is no file-level merging required, instead of resolving merge for trivial cases and leaving conflicting files unresolved in the index." onmousemove="i18n(this)">&Ocy;&gcy;&rcy;&acy;&ncy;&icy;&chcy;&softcy;&tcy;&iecy; &tcy;&rcy;&iecy;&khcy;&scy;&tcy;&ocy;&rcy;&ocy;&ncy;&ncy;&iecy;&iecy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>git read-tree</code>  &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &vcy; &tcy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy;, &iecy;&scy;&lcy;&icy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; &ncy;&acy; &ucy;&rcy;&ocy;&vcy;&ncy;&iecy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy; &ncy;&iecy; &tcy;&rcy;&iecy;&bcy;&ucy;&iecy;&tcy;&scy;&yacy;, &vcy;&mcy;&iecy;&scy;&tcy;&ocy; &tcy;&ocy;&gcy;&ocy;, &chcy;&tcy;&ocy;&bcy;&ycy; &rcy;&acy;&zcy;&rcy;&iecy;&shcy;&acy;&tcy;&softcy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; &dcy;&lcy;&yacy; &tcy;&rcy;&icy;&vcy;&icy;&acy;&lcy;&softcy;&ncy;&ycy;&khcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy;&vcy; &icy; &ocy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&tcy;&softcy; &kcy;&ocy;&ncy;&fcy;&lcy;&icy;&kcy;&tcy;&ucy;&yucy;&shchcy;&icy;&iecy; &fcy;&acy;&jcy;&lcy;&ycy; &ncy;&iecy;&rcy;&acy;&zcy;&rcy;&iecy;&shcy;&iecy;&ncy;&ncy;&ycy;&mcy;&icy; &vcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&iecy;.</span></p> </dd> <dt id="Documentation/git-read-tree.txt---aggressive"><span data-i18n="e63c400ecc6e3d0880b7918d714c1e10e2c568f4e04499496ff015ae981db030/cf" data-source="--aggressive" onmousemove="i18n(this)">--aggressive</span></dt> <dd> <p><span data-i18n="3a7ae7d2d07e07f204e9cca120b76cb5ca185ae6ff7067b7b77a1d89a0f06b16/c4" data-source="Usually a three-way merge by &lt;code&gt;git read-tree&lt;/code&gt; resolves the merge for really trivial cases and leaves other cases unresolved in the index, so that porcelains can implement different merge policies. This flag makes the command resolve a few more cases internally:" onmousemove="i18n(this)">&Ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &tcy;&rcy;&iecy;&khcy;&scy;&tcy;&ocy;&rcy;&ocy;&ncy;&ncy;&iecy;&iecy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>git read-tree</code>  &rcy;&acy;&zcy;&rcy;&iecy;&shcy;&acy;&iecy;&tcy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; &dcy;&lcy;&yacy; &dcy;&iecy;&jcy;&scy;&tcy;&vcy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy; &tcy;&rcy;&icy;&vcy;&icy;&acy;&lcy;&softcy;&ncy;&ycy;&khcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy;&vcy; &icy; &ocy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&iecy;&tcy; &dcy;&rcy;&ucy;&gcy;&icy;&iecy; &scy;&lcy;&ucy;&chcy;&acy;&icy; &ncy;&iecy;&rcy;&acy;&zcy;&rcy;&iecy;&shcy;&iecy;&ncy;&ncy;&ycy;&mcy;&icy; &vcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&iecy;, &tcy;&acy;&kcy; &chcy;&tcy;&ocy; &fcy;&acy;&rcy;&fcy;&ocy;&rcy;&ycy; &mcy;&ocy;&gcy;&ucy;&tcy; &rcy;&iecy;&acy;&lcy;&icy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &rcy;&acy;&zcy;&ncy;&ycy;&iecy; &pcy;&ocy;&lcy;&icy;&tcy;&icy;&kcy;&icy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy;. &Ecy;&tcy;&ocy;&tcy; &fcy;&lcy;&acy;&gcy; &zcy;&acy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&iecy;&tcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ucy; &rcy;&acy;&zcy;&rcy;&iecy;&shcy;&acy;&tcy;&softcy; &iecy;&shchcy;&iecy; &ncy;&iecy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ocy; &scy;&lcy;&ucy;&chcy;&acy;&iecy;&vcy; &vcy;&ncy;&ucy;&tcy;&rcy;&icy; &scy;&iecy;&bcy;&yacy;:</span></p> <div> <ul> <li> <p><span data-i18n="fd18f057bf9602c747c502816e7d079b5bb955dc38c11e34dfeb52a7bbbb911f/af" data-source="when one side removes a path and the other side leaves the path unmodified. The resolution is to remove that path." onmousemove="i18n(this)">&kcy;&ocy;&gcy;&dcy;&acy; &ocy;&dcy;&ncy;&acy; &scy;&tcy;&ocy;&rcy;&ocy;&ncy;&acy; &ucy;&dcy;&acy;&lcy;&yacy;&iecy;&tcy; &pcy;&ucy;&tcy;&softcy;, &acy; &dcy;&rcy;&ucy;&gcy;&acy;&yacy; &scy;&tcy;&ocy;&rcy;&ocy;&ncy;&acy; &ocy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&iecy;&tcy; &pcy;&ucy;&tcy;&softcy; &ncy;&iecy;&icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&ncy;&ycy;&mcy;. &Rcy;&iecy;&shcy;&iecy;&ncy;&icy;&iecy; &scy;&ocy;&scy;&tcy;&ocy;&icy;&tcy; &vcy; &tcy;&ocy;&mcy;, &chcy;&tcy;&ocy;&bcy;&ycy; &ucy;&dcy;&acy;&lcy;&icy;&tcy;&softcy; &ecy;&tcy;&ocy;&tcy; &pcy;&ucy;&tcy;&softcy;.</span></p> </li> <li> <p><span data-i18n="48fbab637b97825438fea60704a18e2f7f816fe99d0774ff1849535e0883d70d/dd" data-source="when both sides remove a path. The resolution is to remove that path." onmousemove="i18n(this)">&kcy;&ocy;&gcy;&dcy;&acy; &ocy;&bcy;&iecy; &scy;&tcy;&ocy;&rcy;&ocy;&ncy;&ycy; &ucy;&dcy;&acy;&lcy;&yacy;&yucy;&tcy; &pcy;&ucy;&tcy;&softcy;. &Rcy;&iecy;&shcy;&iecy;&ncy;&icy;&iecy; &scy;&ocy;&scy;&tcy;&ocy;&icy;&tcy; &vcy; &tcy;&ocy;&mcy;, &chcy;&tcy;&ocy;&bcy;&ycy; &ucy;&dcy;&acy;&lcy;&icy;&tcy;&softcy; &ecy;&tcy;&ocy;&tcy; &pcy;&ucy;&tcy;&softcy;.</span></p> </li> <li> <p><span data-i18n="2327718a180f5bf22f2b82dacc4011d8fdb418e4e47ab58f0612708548f08038/29" data-source="when both sides add a path identically. The resolution is to add that path." onmousemove="i18n(this)">&kcy;&ocy;&gcy;&dcy;&acy; &ocy;&bcy;&iecy; &scy;&tcy;&ocy;&rcy;&ocy;&ncy;&ycy; &dcy;&ocy;&bcy;&acy;&vcy;&lcy;&yacy;&yucy;&tcy; &pcy;&ucy;&tcy;&softcy; &ocy;&dcy;&icy;&ncy;&acy;&kcy;&ocy;&vcy;&ocy;. &Rcy;&iecy;&shcy;&iecy;&ncy;&icy;&iecy; &scy;&ocy;&scy;&tcy;&ocy;&icy;&tcy; &vcy; &tcy;&ocy;&mcy;, &chcy;&tcy;&ocy;&bcy;&ycy; &dcy;&ocy;&bcy;&acy;&vcy;&icy;&tcy;&softcy; &ecy;&tcy;&ocy;&tcy; &pcy;&ucy;&tcy;&softcy;.</span></p> </li> </ul> </div> </dd> <dt id="Documentation/git-read-tree.txt---prefixltprefixgt"><span data-i18n="a63ec313d7f9574827536b78ba710a7e22520fac5cdfcacc53f3792c3a4730ed/a4" data-source="--prefix=&amp;lt;prefix&amp;gt;" onmousemove="i18n(this)">--prefix=&lt;prefix&gt;</span></dt> <dd> <p><span data-i18n="749646996545a36f9b4d18275f9e06c2f307ec3465428c8c19d9caefa0a52b20/98" data-source="Keep the current index contents, and read the contents of the named tree-ish under the directory at &lt;code&gt;&amp;lt;prefix&amp;gt;&lt;/code&gt;. The command will refuse to overwrite entries that already existed in the original index file." onmousemove="i18n(this)">&Scy;&ocy;&khcy;&rcy;&acy;&ncy;&icy;&tcy;&iecy; &tcy;&iecy;&kcy;&ucy;&shchcy;&iecy;&iecy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&mcy;&ocy;&iecy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy; &icy; &pcy;&rcy;&ocy;&chcy;&icy;&tcy;&acy;&jcy;&tcy;&iecy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&mcy;&ocy;&iecy; &icy;&mcy;&iecy;&ncy;&ocy;&vcy;&acy;&ncy;&ncy;&ocy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &vcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&iecy;  <code>&lt;prefix&gt;</code>  . &Kcy;&ocy;&mcy;&acy;&ncy;&dcy;&acy; &ocy;&tcy;&kcy;&acy;&zhcy;&iecy;&tcy;&scy;&yacy; &pcy;&iecy;&rcy;&iecy;&zcy;&acy;&pcy;&icy;&scy;&ycy;&vcy;&acy;&tcy;&softcy; &zcy;&acy;&pcy;&icy;&scy;&icy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &ucy;&zhcy;&iecy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ocy;&vcy;&acy;&lcy;&icy; &vcy; &icy;&scy;&khcy;&ocy;&dcy;&ncy;&ocy;&mcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ocy;&mcy; &fcy;&acy;&jcy;&lcy;&iecy;.</span></p> </dd> <dt id="Documentation/git-read-tree.txt---index-outputltfilegt"><span data-i18n="b0a1972846e9c12a26fa78776060eda7660943bb484d2fb430f5a780d424a110/9d" data-source="--index-output=&amp;lt;file&amp;gt;" onmousemove="i18n(this)">--index-output=&lt;file&gt;</span></dt> <dd> <p><span data-i18n="3ea9083a87e94f7d0c985730fd964cb952b97fbdab8a5918866f4346eb80ab45/ba" data-source="Instead of writing the results out to &lt;code&gt;$GIT_INDEX_FILE&lt;/code&gt;, write the resulting index in the named file. While the command is operating, the original index file is locked with the same mechanism as usual. The file must allow to be rename(2)ed into from a temporary file that is created next to the usual index file; typically this means it needs to be on the same filesystem as the index file itself, and you need write permission to the directories the index file and index output file are located in." onmousemove="i18n(this)">&Vcy;&mcy;&iecy;&scy;&tcy;&ocy; &zcy;&acy;&pcy;&icy;&scy;&icy; &rcy;&iecy;&zcy;&ucy;&lcy;&softcy;&tcy;&acy;&tcy;&ocy;&vcy; &vcy;  <code>$GIT_INDEX_FILE</code>  &zcy;&acy;&pcy;&icy;&shcy;&icy;&tcy;&iecy; &pcy;&ocy;&lcy;&ucy;&chcy;&iecy;&ncy;&ncy;&ycy;&jcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy; &vcy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;&ncy;&ycy;&jcy; &fcy;&acy;&jcy;&lcy;. &Pcy;&ocy;&kcy;&acy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&acy; &rcy;&acy;&bcy;&ocy;&tcy;&acy;&iecy;&tcy;, &icy;&scy;&khcy;&ocy;&dcy;&ncy;&ycy;&jcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ycy;&jcy; &fcy;&acy;&jcy;&lcy; &bcy;&lcy;&ocy;&kcy;&icy;&rcy;&ucy;&iecy;&tcy;&scy;&yacy; &tcy;&iecy;&mcy; &zhcy;&iecy; &mcy;&iecy;&khcy;&acy;&ncy;&icy;&zcy;&mcy;&ocy;&mcy;, &chcy;&tcy;&ocy; &icy; &ocy;&bcy;&ycy;&chcy;&ncy;&ocy;. &Fcy;&acy;&jcy;&lcy; &dcy;&ocy;&lcy;&zhcy;&iecy;&ncy; &dcy;&ocy;&pcy;&ucy;&scy;&kcy;&acy;&tcy;&softcy; &pcy;&iecy;&rcy;&iecy;&icy;&mcy;&iecy;&ncy;&ocy;&vcy;&acy;&ncy;&icy;&iecy;(2) &icy;&zcy; &ZeroWidthSpace;&ZeroWidthSpace;&vcy;&rcy;&iecy;&mcy;&iecy;&ncy;&ncy;&ocy;&gcy;&ocy; &fcy;&acy;&jcy;&lcy;&acy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &scy;&ocy;&zcy;&dcy;&acy;&iecy;&tcy;&scy;&yacy; &rcy;&yacy;&dcy;&ocy;&mcy; &scy; &ocy;&bcy;&ycy;&chcy;&ncy;&ycy;&mcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ycy;&mcy; &fcy;&acy;&jcy;&lcy;&ocy;&mcy;; &ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &ecy;&tcy;&ocy; &ocy;&zcy;&ncy;&acy;&chcy;&acy;&iecy;&tcy;, &chcy;&tcy;&ocy; &ocy;&ncy; &dcy;&ocy;&lcy;&zhcy;&iecy;&ncy; &ncy;&acy;&khcy;&ocy;&dcy;&icy;&tcy;&softcy;&scy;&yacy; &vcy; &tcy;&ocy;&jcy; &zhcy;&iecy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy;&ocy;&jcy; &scy;&icy;&scy;&tcy;&iecy;&mcy;&iecy;, &chcy;&tcy;&ocy; &icy; &scy;&acy;&mcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ycy;&jcy; &fcy;&acy;&jcy;&lcy;, &icy; &vcy;&acy;&mcy; &ncy;&iecy;&ocy;&bcy;&khcy;&ocy;&dcy;&icy;&mcy;&ocy; &rcy;&acy;&zcy;&rcy;&iecy;&shcy;&iecy;&ncy;&icy;&iecy; &ncy;&acy; &zcy;&acy;&pcy;&icy;&scy;&softcy; &vcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&icy;, &vcy; &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&khcy; &rcy;&acy;&scy;&pcy;&ocy;&lcy;&ocy;&zhcy;&iecy;&ncy;&ycy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ycy;&jcy; &fcy;&acy;&jcy;&lcy; &icy; &vcy;&ycy;&khcy;&ocy;&dcy;&ncy;&ocy;&jcy; &fcy;&acy;&jcy;&lcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy;.</span></p> </dd> <dt id="Documentation/git-read-tree.txt---no-recurse-submodules"><span data-i18n="8f0e0394b85d15f0eead5d59c6380d107a0dc41411de7a6b5d973ea0ccb077e4/64" data-source="--[no-]recurse-submodules" onmousemove="i18n(this)">--[no-]recurse-submodules</span></dt> <dd> <p><span data-i18n="a1dd47cd8cfc75067f1a85bb30a69a4f77c201a0c0364055fc0fcce7b6d36912/0f" data-source="Using --recurse-submodules will update the content of all active submodules according to the commit recorded in the superproject by calling read-tree recursively, also setting the submodules&amp;apos; HEAD to be detached at that commit." onmousemove="i18n(this)">&Icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&iecy; --recurse-submodules &ocy;&bcy;&ncy;&ocy;&vcy;&icy;&tcy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&mcy;&ocy;&iecy; &vcy;&scy;&iecy;&khcy; &acy;&kcy;&tcy;&icy;&vcy;&ncy;&ycy;&khcy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&iecy;&jcy; &vcy; &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&icy;&icy; &scy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&iecy;&jcy;, &zcy;&acy;&pcy;&icy;&scy;&acy;&ncy;&ncy;&ocy;&jcy; &vcy; &scy;&ucy;&pcy;&iecy;&rcy;&pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&iecy;, &pcy;&ucy;&tcy;&iecy;&mcy; &rcy;&iecy;&kcy;&ucy;&rcy;&scy;&icy;&vcy;&ncy;&ocy;&gcy;&ocy; &vcy;&ycy;&zcy;&ocy;&vcy;&acy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &chcy;&tcy;&iecy;&ncy;&icy;&yacy;, &acy; &tcy;&acy;&kcy;&zhcy;&iecy; &ucy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&kcy;&icy; HEAD &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&iecy;&jcy; &dcy;&lcy;&yacy; &ocy;&tcy;&scy;&ocy;&iecy;&dcy;&icy;&ncy;&iecy;&ncy;&icy;&yacy; &pcy;&rcy;&icy; &ecy;&tcy;&ocy;&jcy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy;.</span></p> </dd> <dt id="Documentation/git-read-tree.txt---no-sparse-checkout"><span data-i18n="a19d27b53bc5a4e65da65629edb3ac644e34b7b9a74b85129b6c8cbf43bc0d3e/52" data-source="--no-sparse-checkout" onmousemove="i18n(this)">--no-sparse-checkout</span></dt> <dd> <p><span data-i18n="214f02b6cea365a1a0572e80d449c7e185fa16d4cfcb2eed0ff8c3950ef8864f/4b" data-source="Disable sparse checkout support even if &lt;code&gt;core.sparseCheckout&lt;/code&gt; is true." onmousemove="i18n(this)">&Ocy;&tcy;&kcy;&lcy;&yucy;&chcy;&icy;&tcy;&iecy; &pcy;&ocy;&dcy;&dcy;&iecy;&rcy;&zhcy;&kcy;&ucy; &rcy;&acy;&zcy;&rcy;&iecy;&zhcy;&iecy;&ncy;&ncy;&ycy;&khcy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&ocy;&kcy;, &dcy;&acy;&zhcy;&iecy; &iecy;&scy;&lcy;&icy;  <code>core.sparseCheckout</code>  &icy;&mcy;&iecy;&iecy;&tcy; &zcy;&ncy;&acy;&chcy;&iecy;&ncy;&icy;&iecy; true.</span></p> </dd> <dt id="Documentation/git-read-tree.txt---empty"><span data-i18n="d805e9dec7683391afb0d8b96a11ff640df3a6dc3f59c47dfb543e2865b95b17/a6" data-source="--empty" onmousemove="i18n(this)">--empty</span></dt> <dd> <p><span data-i18n="5d739930a3304c5913ed59c2a4806cb4b618948e55ec6c3de51366e43f593659/24" data-source="Instead of reading tree object(s) into the index, just empty it." onmousemove="i18n(this)">&Vcy;&mcy;&iecy;&scy;&tcy;&ocy; &chcy;&tcy;&iecy;&ncy;&icy;&yacy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ocy;&vcy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &vcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &ocy;&chcy;&icy;&scy;&tcy;&icy;&tcy;&iecy; &iecy;&gcy;&ocy;.</span></p> </dd> <dt id="Documentation/git-read-tree.txt--q"><span data-i18n="5ce681666a15a41274346f65b8bcbf56f8e8170ac00706a44a09ee4d786a8609/cd" data-source="-q" onmousemove="i18n(this)">-q</span></dt> <dt id="Documentation/git-read-tree.txt---quiet"><span data-i18n="b00818cdc507640687732769ee1cb501db377927ee76d03df23978bd0d706888/e2" data-source="--quiet" onmousemove="i18n(this)">--quiet</span></dt> <dd> <p><span data-i18n="d413d5cead88768e48ffaf7616182de1407177487333584c59b3d3c98cadc8e7/e2" data-source="Quiet, suppress feedback messages." onmousemove="i18n(this)">&Tcy;&icy;&khcy;&ocy;, &pcy;&ocy;&dcy;&acy;&vcy;&lcy;&yacy;&jcy;&tcy;&iecy; &scy;&ocy;&ocy;&bcy;&shchcy;&iecy;&ncy;&icy;&yacy; &ocy;&bcy;&rcy;&acy;&tcy;&ncy;&ocy;&jcy; &scy;&vcy;&yacy;&zcy;&icy;.</span></p> </dd> <dt id="Documentation/git-read-tree.txt-lttree-ishgt"><span data-i18n="033b1781ab868194a82756c6bdd3628e1bed309b24b907e609da39195a6d361f/0c" data-source="&amp;lt;tree-ish#&amp;gt;" onmousemove="i18n(this)">&lt;tree-ish#&gt;</span></dt> <dd> <p><span data-i18n="dfc5765209d0219ca772aa3f541d1c7ec26b95750b64c12144b356dad0489e1c/55" data-source="The id of the tree object(s) to be read/merged." onmousemove="i18n(this)">&Icy;&dcy;&iecy;&ncy;&tcy;&icy;&fcy;&icy;&kcy;&acy;&tcy;&ocy;&rcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&acy;(&ocy;&vcy;) &dcy;&iecy;&rcy;&iecy;&vcy;&acy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &ncy;&iecy;&ocy;&bcy;&khcy;&ocy;&dcy;&icy;&mcy;&ocy; &pcy;&rcy;&ocy;&chcy;&icy;&tcy;&acy;&tcy;&softcy;/&ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&icy;&tcy;&softcy;.</span></p> </dd> </dl> </div> </div> <h2 class="text-body-emphasis"  id="_merging"><span data-i18n="a975de4f960f3d4037e9c3273bdcd2417b9002eeadd75c7b76d823e0a074f234/e8" data-source="Merging" onmousemove="i18n(this)">Merging</span></h2> <div> <p><span data-i18n="1de6b6a57ec16a7ea8d062f99d08515b59caf3da0f471b4c31206b657c1b2649/9f" data-source="If &lt;code&gt;-m&lt;/code&gt; is specified, &lt;code&gt;git read-tree&lt;/code&gt; can perform 3 kinds of merge, a single tree merge if only 1 tree is given, a fast-forward merge with 2 trees, or a 3-way merge if 3 or more trees are provided." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;  <code>-m</code> ,  <code>git read-tree</code>  &mcy;&ocy;&zhcy;&iecy;&tcy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&yacy;&tcy;&softcy; 3 &vcy;&icy;&dcy;&acy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy;: &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; &ocy;&dcy;&ncy;&ocy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;, &iecy;&scy;&lcy;&icy; &zcy;&acy;&dcy;&acy;&ncy;&ocy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; 1 &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;, &ucy;&scy;&kcy;&ocy;&rcy;&iecy;&ncy;&ncy;&ocy;&iecy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; &scy; &dcy;&vcy;&ucy;&mcy;&yacy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&yacy;&mcy;&icy; &icy;&lcy;&icy; &tcy;&rcy;&iecy;&khcy;&scy;&tcy;&ocy;&rcy;&ocy;&ncy;&ncy;&iecy;&iecy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy;, &iecy;&scy;&lcy;&icy; &zcy;&acy;&dcy;&acy;&ncy;&ocy; 3 &icy;&lcy;&icy; &bcy;&ocy;&lcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&iecy;&vcy;.</span></p> <div> <h3 class="text-body-emphasis"  id="_single_tree_merge"><span data-i18n="033666ef26a385d5413228e425567c155fdc60c33d35554dc4510cd4c7b2c724/aa" data-source="Single Tree Merge" onmousemove="i18n(this)">&Scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; &ocy;&dcy;&ncy;&ocy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;</span></h3> <p><span data-i18n="4fd637adb26fe9de93cb4a6082f7e910fba95b1d5afb10cd9ae0bd051d2304b7/97" data-source="If only 1 tree is specified, &lt;code&gt;git read-tree&lt;/code&gt; operates as if the user did not specify &lt;code&gt;-m&lt;/code&gt;, except that if the original index has an entry for a given pathname, and the contents of the path match with the tree being read, the stat info from the index is used. (In other words, the index&amp;rsquo;s stat()s take precedence over the merged tree&amp;rsquo;s)." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;&ocy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &ocy;&dcy;&ncy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;,  <code>git read-tree</code>  &rcy;&acy;&bcy;&ocy;&tcy;&acy;&iecy;&tcy; &tcy;&acy;&kcy;, &kcy;&acy;&kcy; &iecy;&scy;&lcy;&icy; &bcy;&ycy; &pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&iecy;&lcy;&softcy; &ncy;&iecy; &ucy;&kcy;&acy;&zcy;&acy;&lcy;  <code>-m</code> , &zcy;&acy; &icy;&scy;&kcy;&lcy;&yucy;&chcy;&iecy;&ncy;&icy;&iecy;&mcy; &tcy;&ocy;&gcy;&ocy;, &chcy;&tcy;&ocy; &iecy;&scy;&lcy;&icy; &vcy; &icy;&scy;&khcy;&ocy;&dcy;&ncy;&ocy;&mcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&iecy; &iecy;&scy;&tcy;&softcy; &zcy;&acy;&pcy;&icy;&scy;&softcy; &dcy;&lcy;&yacy; &dcy;&acy;&ncy;&ncy;&ocy;&gcy;&ocy; &pcy;&ucy;&tcy;&icy; &icy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&mcy;&ocy;&iecy; &pcy;&ucy;&tcy;&icy; &scy;&ocy;&vcy;&pcy;&acy;&dcy;&acy;&iecy;&tcy; &scy; &scy;&chcy;&icy;&tcy;&ycy;&vcy;&acy;&iecy;&mcy;&ycy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;&mcy;, &scy;&tcy;&acy;&tcy;&icy;&scy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&acy;&yacy; &icy;&ncy;&fcy;&ocy;&rcy;&mcy;&acy;&tscy;&icy;&yacy; &icy;&zcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&scy;&yacy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;. (&Dcy;&rcy;&ucy;&gcy;&icy;&mcy;&icy; &scy;&lcy;&ocy;&vcy;&acy;&mcy;&icy;, stat() &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy; &icy;&mcy;&iecy;&yucy;&tcy; &pcy;&rcy;&icy;&ocy;&rcy;&icy;&tcy;&iecy;&tcy; &ncy;&acy;&dcy; &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&iecy;&ncy;&ncy;&ycy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;&mcy;).</span></p> <p><span data-i18n="bda9772fb1b5d33ccb7d42324f5bfa067361e2d5cd4c68161bb90a91e57dc688/99" data-source="That means that if you do a &lt;code&gt;git read-tree -m &amp;lt;newtree&amp;gt;&lt;/code&gt; followed by a &lt;code&gt;git checkout-index -f -u -a&lt;/code&gt;, the &lt;code&gt;git checkout-index&lt;/code&gt; only checks out the stuff that really changed." onmousemove="i18n(this)">&Ecy;&tcy;&ocy; &ocy;&zcy;&ncy;&acy;&chcy;&acy;&iecy;&tcy;, &chcy;&tcy;&ocy; &iecy;&scy;&lcy;&icy; &vcy;&ycy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&yacy;&iecy;&tcy;&iecy;  <code>git read-tree -m &lt;newtree&gt;</code> , &acy; &zcy;&acy;&tcy;&iecy;&mcy;  <code>git checkout-index -f -u -a</code> ,  <code>git checkout-index</code>  &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&yacy;&iecy;&tcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &tcy;&ocy;, &chcy;&tcy;&ocy; &dcy;&iecy;&jcy;&scy;&tcy;&vcy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy; &icy;&zcy;&mcy;&iecy;&ncy;&icy;&lcy;&ocy;&scy;&softcy;.</span></p> <p><span data-i18n="b1ce9f546d21b29c093551976a6259f41ce1b29bc57bbda9261cd3623a06b6ec/f4" data-source="This is used to avoid unnecessary false hits when &lt;code&gt;git diff-files&lt;/code&gt; is run after &lt;code&gt;git read-tree&lt;/code&gt;." onmousemove="i18n(this)">&Ecy;&tcy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&scy;&yacy;, &chcy;&tcy;&ocy;&bcy;&ycy; &icy;&zcy;&bcy;&iecy;&zhcy;&acy;&tcy;&softcy; &ncy;&iecy;&ncy;&ucy;&zhcy;&ncy;&ycy;&khcy; &pcy;&ocy;&pcy;&acy;&dcy;&acy;&ncy;&icy;&jcy;  false , &kcy;&ocy;&gcy;&dcy;&acy;  <code>git diff-files</code>  &zcy;&acy;&pcy;&ucy;&scy;&kcy;&acy;&iecy;&tcy;&scy;&yacy; &pcy;&ocy;&scy;&lcy;&iecy;  <code>git read-tree</code> .</span></p> </div> <div> <h3 class="text-body-emphasis"  id="_two_tree_merge"><span data-i18n="8727615df0e04539f753fd8494ca864073a65dc1472f9ca5a63e7c6ff936d24a/99" data-source="Two Tree Merge" onmousemove="i18n(this)">&Scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; &dcy;&vcy;&ucy;&khcy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&iecy;&vcy;</span></h3> <p><span data-i18n="511ef9343a03fdef2bb63240b0bf11258a7747d642152b3c74c74e714657c08b/64" data-source="Typically, this is invoked as &lt;code&gt;git read-tree -m $H $M&lt;/code&gt;, where $H is the head commit of the current repository, and $M is the head of a foreign tree, which is simply ahead of $H (i.e. we are in a fast-forward situation)." onmousemove="i18n(this)">&Ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &ecy;&tcy;&ocy; &vcy;&ycy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy; &kcy;&acy;&kcy;  <code>git read-tree -m $H $M</code>  , &gcy;&dcy;&iecy; $H &mdash; &ecy;&tcy;&ocy; &gcy;&ocy;&lcy;&ocy;&vcy;&acy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy; &tcy;&iecy;&kcy;&ucy;&shchcy;&iecy;&gcy;&ocy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;, &acy; $M &mdash; &ecy;&tcy;&ocy; &gcy;&ocy;&lcy;&ocy;&vcy;&acy; &vcy;&ncy;&iecy;&shcy;&ncy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&iecy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &ocy;&pcy;&iecy;&rcy;&iecy;&zhcy;&acy;&iecy;&tcy; $H (&tcy;. &iecy;. &mcy;&ycy; &ncy;&acy;&khcy;&ocy;&dcy;&icy;&mcy;&scy;&yacy; &vcy; &scy;&icy;&tcy;&ucy;&acy;&tscy;&icy;&icy; &pcy;&iecy;&rcy;&iecy;&mcy;&ocy;&tcy;&kcy;&icy; &vcy;&pcy;&iecy;&rcy;&iecy;&dcy;).</span></p> <p><span data-i18n="fe7787a9ed3f21d6defdb3ad799394f262b9d97b4d9422b808b7cd0b11386349/55" data-source="When two trees are specified, the user is telling &lt;code&gt;git read-tree&lt;/code&gt; the following:" onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;&ycy; &dcy;&vcy;&acy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;, &pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&iecy;&lcy;&softcy; &scy;&ocy;&ocy;&bcy;&shchcy;&acy;&iecy;&tcy;  <code>git read-tree</code>  &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&iecy;&iecy;:</span></p> <div> <ol> <li> <p><span data-i18n="a0e337aa81dd8fef79440e6a7014a5d27ac6aa2b2ba9a940fd17212c519eddd9/e7" data-source="The current index and work tree is derived from $H, but the user may have local changes in them since $H." onmousemove="i18n(this)">&Tcy;&iecy;&kcy;&ucy;&shchcy;&icy;&jcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy; &icy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &pcy;&ocy;&lcy;&ucy;&chcy;&iecy;&ncy;&ycy; &icy;&zcy; $H, &ncy;&ocy; &pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&iecy;&lcy;&softcy; &mcy;&ocy;&zhcy;&iecy;&tcy; &icy;&mcy;&iecy;&tcy;&softcy; &vcy; &ncy;&icy;&khcy; &lcy;&ocy;&kcy;&acy;&lcy;&softcy;&ncy;&ycy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy;, &ncy;&acy;&chcy;&icy;&ncy;&acy;&yacy; &scy; $H.</span></p> </li> <li> <p><span data-i18n="b5d85fc091e10d478bcd915b6f88bb5b9dbcfcb953d170430c2b593291b70638/96" data-source="The user wants to fast-forward to $M." onmousemove="i18n(this)">&Pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&iecy;&lcy;&softcy; &khcy;&ocy;&chcy;&iecy;&tcy; &pcy;&iecy;&rcy;&iecy;&jcy;&tcy;&icy; &kcy; $M.</span></p> </li> </ol> </div> <p><span data-i18n="24635545420b44f8846abae401092306a1a5fe5c1253bdf70f098c3f69c6bfc2/eb" data-source="In this case, the &lt;code&gt;git read-tree -m $H $M&lt;/code&gt; command makes sure that no local change is lost as the result of this &amp;quot;merge&amp;quot;. Here are the &amp;quot;carry forward&amp;quot; rules, where &amp;quot;I&amp;quot; denotes the index, &amp;quot;clean&amp;quot; means that index and work tree coincide, and &amp;quot;exists&amp;quot;/&amp;quot;nothing&amp;quot; refer to the presence of a path in the specified commit:" onmousemove="i18n(this)">&Vcy; &ecy;&tcy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&acy;  <code>git read-tree -m $H $M</code>  &gcy;&acy;&rcy;&acy;&ncy;&tcy;&icy;&rcy;&ucy;&iecy;&tcy;, &chcy;&tcy;&ocy; &ncy;&icy;&kcy;&acy;&kcy;&icy;&iecy; &lcy;&ocy;&kcy;&acy;&lcy;&softcy;&ncy;&ycy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy; &ncy;&iecy; &bcy;&ucy;&dcy;&ucy;&tcy; &pcy;&ocy;&tcy;&iecy;&rcy;&yacy;&ncy;&ycy; &vcy; &rcy;&iecy;&zcy;&ucy;&lcy;&softcy;&tcy;&acy;&tcy;&iecy; &dcy;&iecy;&jcy;&scy;&tcy;&vcy;&icy;&yacy;  &quot;merge&quot; . &Vcy;&ocy;&tcy; &pcy;&rcy;&acy;&vcy;&icy;&lcy;&acy;  &quot;carry forward&quot; , &gcy;&dcy;&iecy;  &quot;I&quot;  &ocy;&bcy;&ocy;&zcy;&ncy;&acy;&chcy;&acy;&iecy;&tcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;,  &quot;clean&quot;  &ocy;&zcy;&ncy;&acy;&chcy;&acy;&iecy;&tcy;, &chcy;&tcy;&ocy; &icy;&ncy;&dcy;&iecy;&kcy;&scy; &icy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &scy;&ocy;&vcy;&pcy;&acy;&dcy;&acy;&yucy;&tcy;, &acy;  &quot;exists&quot; / &quot;nothing&quot;  &ocy;&tcy;&ncy;&ocy;&scy;&yacy;&tcy;&scy;&yacy; &kcy; &ncy;&acy;&lcy;&icy;&chcy;&icy;&yucy; &pcy;&ucy;&tcy;&icy; &vcy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;&ncy;&ocy;&mcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&iecy;:</span></p> <div> <div> <pre class="hljs language-perl">        I                   H        M        Result
       -------------------------------------------------------
     <span class="hljs-number">0</span>  nothing             nothing  nothing  (does <span class="hljs-keyword">not</span> happen)
     <span class="hljs-number">1</span>  nothing             nothing  <span class="hljs-keyword">exists</span>   <span class="hljs-keyword">use</span> M
     <span class="hljs-number">2</span>  nothing             <span class="hljs-keyword">exists</span>   nothing  remove path from <span class="hljs-keyword">index</span>
     <span class="hljs-number">3</span>  nothing             <span class="hljs-keyword">exists</span>   <span class="hljs-keyword">exists</span>,  <span class="hljs-keyword">use</span> M <span class="hljs-keyword">if</span> <span class="hljs-string">&quot;initial checkout&quot;</span>,
                                     H == M   keep <span class="hljs-keyword">index</span> otherwise
                                     <span class="hljs-keyword">exists</span>,  fail
                                     H != M

        clean I==H  I==M
       ------------------
     <span class="hljs-number">4</span>  yes   N/A   N/A     nothing  nothing  keep <span class="hljs-keyword">index</span>
     <span class="hljs-number">5</span>  <span class="hljs-keyword">no</span>    N/A   N/A     nothing  nothing  keep <span class="hljs-keyword">index</span>

     <span class="hljs-number">6</span>  yes   N/A   yes     nothing  <span class="hljs-keyword">exists</span>   keep <span class="hljs-keyword">index</span>
     <span class="hljs-number">7</span>  <span class="hljs-keyword">no</span>    N/A   yes     nothing  <span class="hljs-keyword">exists</span>   keep <span class="hljs-keyword">index</span>
     <span class="hljs-number">8</span>  yes   N/A   <span class="hljs-keyword">no</span>      nothing  <span class="hljs-keyword">exists</span>   fail
     <span class="hljs-number">9</span>  <span class="hljs-keyword">no</span>    N/A   <span class="hljs-keyword">no</span>      nothing  <span class="hljs-keyword">exists</span>   fail

     <span class="hljs-number">10</span> yes   yes   N/A     <span class="hljs-keyword">exists</span>   nothing  remove path from <span class="hljs-keyword">index</span>
     <span class="hljs-number">11</span> <span class="hljs-keyword">no</span>    yes   N/A     <span class="hljs-keyword">exists</span>   nothing  fail
     <span class="hljs-number">12</span> yes   <span class="hljs-keyword">no</span>    N/A     <span class="hljs-keyword">exists</span>   nothing  fail
     <span class="hljs-number">13</span> <span class="hljs-keyword">no</span>    <span class="hljs-keyword">no</span>    N/A     <span class="hljs-keyword">exists</span>   nothing  fail

        clean (H==M)
       ------
     <span class="hljs-number">14</span> yes                 <span class="hljs-keyword">exists</span>   <span class="hljs-keyword">exists</span>   keep <span class="hljs-keyword">index</span>
     <span class="hljs-number">15</span> <span class="hljs-keyword">no</span>                  <span class="hljs-keyword">exists</span>   <span class="hljs-keyword">exists</span>   keep <span class="hljs-keyword">index</span>

        clean I==H  I==M (H!=M)
       ------------------
     <span class="hljs-number">16</span> yes   <span class="hljs-keyword">no</span>    <span class="hljs-keyword">no</span>      <span class="hljs-keyword">exists</span>   <span class="hljs-keyword">exists</span>   fail
     <span class="hljs-number">17</span> <span class="hljs-keyword">no</span>    <span class="hljs-keyword">no</span>    <span class="hljs-keyword">no</span>      <span class="hljs-keyword">exists</span>   <span class="hljs-keyword">exists</span>   fail
     <span class="hljs-number">18</span> yes   <span class="hljs-keyword">no</span>    yes     <span class="hljs-keyword">exists</span>   <span class="hljs-keyword">exists</span>   keep <span class="hljs-keyword">index</span>
     <span class="hljs-number">19</span> <span class="hljs-keyword">no</span>    <span class="hljs-keyword">no</span>    yes     <span class="hljs-keyword">exists</span>   <span class="hljs-keyword">exists</span>   keep <span class="hljs-keyword">index</span>
     <span class="hljs-number">20</span> yes   yes   <span class="hljs-keyword">no</span>      <span class="hljs-keyword">exists</span>   <span class="hljs-keyword">exists</span>   <span class="hljs-keyword">use</span> M
     <span class="hljs-number">21</span> <span class="hljs-keyword">no</span>    yes   <span class="hljs-keyword">no</span>      <span class="hljs-keyword">exists</span>   <span class="hljs-keyword">exists</span>   fail</pre> </div> </div> <p><span data-i18n="ebea9941b4f0148ed10b4d5e3cfd0f3f5af3a438e34e5b895ea4d062f2f3ad00/43" data-source="In all &amp;quot;keep index&amp;quot; cases, the index entry stays as in the original index file. If the entry is not up to date, &lt;code&gt;git read-tree&lt;/code&gt; keeps the copy in the work tree intact when operating under the -u flag." onmousemove="i18n(this)">&Vcy;&ocy; &vcy;&scy;&iecy;&khcy; &scy;&lcy;&ucy;&chcy;&acy;&yacy;&khcy;  &quot;keep index&quot;  &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&acy;&yacy; &zcy;&acy;&pcy;&icy;&scy;&softcy; &ocy;&scy;&tcy;&acy;&iecy;&tcy;&scy;&yacy; &tcy;&acy;&kcy;&ocy;&jcy; &zhcy;&iecy;, &kcy;&acy;&kcy; &vcy; &icy;&scy;&khcy;&ocy;&dcy;&ncy;&ocy;&mcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ocy;&mcy; &fcy;&acy;&jcy;&lcy;&iecy;. &IEcy;&scy;&lcy;&icy; &zcy;&acy;&pcy;&icy;&scy;&softcy; &ucy;&scy;&tcy;&acy;&rcy;&iecy;&lcy;&acy;,  <code>git read-tree</code>  &scy;&ocy;&khcy;&rcy;&acy;&ncy;&yacy;&iecy;&tcy; &kcy;&ocy;&pcy;&icy;&yucy; &vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy; &ncy;&iecy;&pcy;&ocy;&vcy;&rcy;&iecy;&zhcy;&dcy;&iecy;&ncy;&ncy;&ocy;&jcy; &pcy;&rcy;&icy; &rcy;&acy;&bcy;&ocy;&tcy;&iecy; &scy; &fcy;&lcy;&acy;&gcy;&ocy;&mcy; -u.</span></p> <p><span data-i18n="f6f477fbe00833279d0372fb1d29653d070ec03fbab42a56d4e887b8cb06e8ce/ce" data-source="When this form of &lt;code&gt;git read-tree&lt;/code&gt; returns successfully, you can see which of the &amp;quot;local changes&amp;quot; that you made were carried forward by running &lt;code&gt;git diff-index --cached $M&lt;/code&gt;. Note that this does not necessarily match what &lt;code&gt;git diff-index --cached $H&lt;/code&gt; would have produced before such a two tree merge. This is because of cases 18 and 19 &amp;mdash; if you already had the changes in $M (e.g. maybe you picked it up via e-mail in a patch form), &lt;code&gt;git diff-index
--cached $H&lt;/code&gt; would have told you about the change before this merge, but it would not show in &lt;code&gt;git diff-index --cached $M&lt;/code&gt; output after the two-tree merge." onmousemove="i18n(this)">&Kcy;&ocy;&gcy;&dcy;&acy; &ecy;&tcy;&acy; &fcy;&ocy;&rcy;&mcy;&acy;  <code>git read-tree</code>  &ucy;&scy;&pcy;&iecy;&shcy;&ncy;&ocy; &vcy;&ocy;&zcy;&vcy;&rcy;&acy;&shchcy;&acy;&iecy;&tcy;&scy;&yacy;, &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &ucy;&vcy;&icy;&dcy;&iecy;&tcy;&softcy;, &kcy;&acy;&kcy;&ocy;&jcy; &icy;&zcy; &scy;&ocy;&zcy;&dcy;&acy;&ncy;&ncy;&ycy;&khcy; &vcy;&acy;&mcy;&icy;  &quot;local changes&quot;  &bcy;&ycy;&lcy; &pcy;&iecy;&rcy;&iecy;&ncy;&iecy;&scy;&iecy;&ncy;, &zcy;&acy;&pcy;&ucy;&scy;&tcy;&icy;&vcy;  <code>git diff-index --cached $M</code>  . &Ocy;&bcy;&rcy;&acy;&tcy;&icy;&tcy;&iecy; &vcy;&ncy;&icy;&mcy;&acy;&ncy;&icy;&iecy;, &chcy;&tcy;&ocy; &ecy;&tcy;&ocy; &ncy;&iecy; &ocy;&bcy;&yacy;&zcy;&acy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy; &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &tcy;&ocy;&mcy;&ucy;, &chcy;&tcy;&ocy;  <code>git diff-index --cached $H</code>  &scy;&ocy;&zcy;&dcy;&acy;&lcy; &bcy;&ycy; &dcy;&ocy; &tcy;&acy;&kcy;&ocy;&gcy;&ocy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy; &dcy;&vcy;&ucy;&khcy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&iecy;&vcy;. &Ecy;&tcy;&ocy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ocy; &scy;&ocy; &scy;&lcy;&ucy;&chcy;&acy;&yacy;&mcy;&icy; 18 &icy; 19 &mdash; &iecy;&scy;&lcy;&icy; &bcy;&ycy; &ucy; &vcy;&acy;&scy; &ucy;&zhcy;&iecy; &bcy;&ycy;&lcy;&icy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy; &vcy; $M (&ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &vcy;&ycy; &pcy;&ocy;&lcy;&ucy;&chcy;&icy;&lcy;&icy; &icy;&khcy; &pcy;&ocy; &ecy;&lcy;&iecy;&kcy;&tcy;&rcy;&ocy;&ncy;&ncy;&ocy;&jcy; &pcy;&ocy;&chcy;&tcy;&iecy; &vcy; &fcy;&ocy;&rcy;&mcy;&iecy; &icy;&scy;&pcy;&rcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&yacy;),  <code>git diff-index
--cached $H</code>  &scy;&ocy;&ocy;&bcy;&shchcy;&icy;&lcy; &bcy;&ycy; &vcy;&acy;&mcy; &ocy;&bcy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&icy; &dcy;&ocy; &ecy;&tcy;&ocy;&gcy;&ocy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy;, &ncy;&ocy; &ecy;&tcy;&ocy; &ncy;&iecy; &ocy;&tcy;&ocy;&bcy;&rcy;&acy;&zhcy;&acy;&tcy;&softcy;&scy;&yacy; &vcy; &vcy;&ycy;&vcy;&ocy;&dcy;&iecy;  <code>git diff-index --cached $M</code>  &pcy;&ocy;&scy;&lcy;&iecy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy; &dcy;&vcy;&ucy;&khcy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&iecy;&vcy;.</span></p> <p><span data-i18n="375b8678f7a88fe23ed5bcca3b79675b3220e51af7873574a2bb598737c8a5ae/01" data-source="Case 3 is slightly tricky and needs explanation. The result from this rule logically should be to remove the path if the user staged the removal of the path and then switching to a new branch. That however will prevent the initial checkout from happening, so the rule is modified to use M (new tree) only when the content of the index is empty. Otherwise the removal of the path is kept as long as $H and $M are the same." onmousemove="i18n(this)">&Scy;&lcy;&ucy;&chcy;&acy;&jcy; 3 &ncy;&iecy;&mcy;&ncy;&ocy;&gcy;&ocy; &scy;&lcy;&ocy;&zhcy;&iecy;&ncy; &icy; &tcy;&rcy;&iecy;&bcy;&ucy;&iecy;&tcy; &pcy;&ocy;&yacy;&scy;&ncy;&iecy;&ncy;&icy;&yacy;. &Lcy;&ocy;&gcy;&icy;&chcy;&iecy;&scy;&kcy;&icy; &rcy;&iecy;&zcy;&ucy;&lcy;&softcy;&tcy;&acy;&tcy;&ocy;&mcy; &ecy;&tcy;&ocy;&gcy;&ocy; &pcy;&rcy;&acy;&vcy;&icy;&lcy;&acy; &dcy;&ocy;&lcy;&zhcy;&ncy;&ocy; &bcy;&ycy;&tcy;&softcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&icy;&iecy; &pcy;&ucy;&tcy;&icy;, &iecy;&scy;&lcy;&icy; &pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&iecy;&lcy;&softcy; &icy;&ncy;&scy;&tscy;&iecy;&ncy;&icy;&rcy;&ocy;&vcy;&acy;&lcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&icy;&iecy; &pcy;&ucy;&tcy;&icy;, &acy; &zcy;&acy;&tcy;&iecy;&mcy; &pcy;&iecy;&rcy;&iecy;&kcy;&lcy;&yucy;&chcy;&icy;&lcy;&scy;&yacy; &ncy;&acy; &ncy;&ocy;&vcy;&ucy;&yucy; &vcy;&iecy;&tcy;&kcy;&ucy;. &Ocy;&dcy;&ncy;&acy;&kcy;&ocy; &ecy;&tcy;&ocy; &pcy;&rcy;&iecy;&dcy;&ocy;&tcy;&vcy;&rcy;&acy;&tcy;&icy;&tcy; &pcy;&iecy;&rcy;&vcy;&ocy;&ncy;&acy;&chcy;&acy;&lcy;&softcy;&ncy;&ucy;&yucy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&kcy;&ucy;, &pcy;&ocy;&ecy;&tcy;&ocy;&mcy;&ucy; &pcy;&rcy;&acy;&vcy;&icy;&lcy;&ocy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&ocy; &ncy;&acy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&iecy; M (&ncy;&ocy;&vcy;&ocy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;) &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &tcy;&ocy;&gcy;&dcy;&acy;, &kcy;&ocy;&gcy;&dcy;&acy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&mcy;&ocy;&iecy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy; &pcy;&ucy;&scy;&tcy;&ocy;. &Vcy; &pcy;&rcy;&ocy;&tcy;&icy;&vcy;&ncy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&icy;&iecy; &pcy;&ucy;&tcy;&icy; &scy;&ocy;&khcy;&rcy;&acy;&ncy;&yacy;&iecy;&tcy;&scy;&yacy; &dcy;&ocy; &tcy;&iecy;&khcy; &pcy;&ocy;&rcy;, &pcy;&ocy;&kcy;&acy; $H &icy; $M &scy;&ocy;&vcy;&pcy;&acy;&dcy;&acy;&yucy;&tcy;.</span></p> </div> <div> <h3 class="text-body-emphasis"  id="_3_way_merge"><span data-i18n="a41959f9bd7186f0713ee96a5b2b059f3f72e9d0445654c44760bb53bfb4f640/96" data-source="3-Way Merge" onmousemove="i18n(this)">3-Way Merge</span></h3> <p><span data-i18n="02e0e2dab2b37038bb39c382096b91c17be82d1ff41b89304058eba8e3e31696/c7" data-source="Each &amp;quot;index&amp;quot; entry has two bits worth of &amp;quot;stage&amp;quot; state. stage 0 is the normal one, and is the only one you&amp;rsquo;d see in any kind of normal use." onmousemove="i18n(this)">&Kcy;&acy;&zhcy;&dcy;&acy;&yacy; &zcy;&acy;&pcy;&icy;&scy;&softcy;  &quot;index&quot;  &icy;&mcy;&iecy;&iecy;&tcy; &dcy;&vcy;&acy; &bcy;&icy;&tcy;&acy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&yacy;  &quot;stage&quot; . &scy;&tcy;&acy;&dcy;&icy;&yacy; 0 &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &ncy;&ocy;&rcy;&mcy;&acy;&lcy;&softcy;&ncy;&ocy;&jcy; &icy; &iecy;&dcy;&icy;&ncy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&ocy;&jcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ucy;&yucy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &ucy;&vcy;&icy;&dcy;&iecy;&tcy;&softcy; &pcy;&rcy;&icy; &ocy;&bcy;&ycy;&chcy;&ncy;&ocy;&mcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&icy;.</span></p> <p><span data-i18n="d226ed8728287fe65d5a5e69077634c5ff0d5d902fc10fccafae21b873b3cbbe/f2" data-source="However, when you do &lt;code&gt;git read-tree&lt;/code&gt; with three trees, the &amp;quot;stage&amp;quot; starts out at 1." onmousemove="i18n(this)">&Ocy;&dcy;&ncy;&acy;&kcy;&ocy; &kcy;&ocy;&gcy;&dcy;&acy; &vcy;&ycy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&yacy;&iecy;&tcy;&iecy;  <code>git read-tree</code>  &scy; &tcy;&rcy;&iecy;&mcy;&yacy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&yacy;&mcy;&icy;,  &quot;stage&quot;  &ncy;&acy;&chcy;&icy;&ncy;&acy;&iecy;&tcy;&scy;&yacy; &scy; 1.</span></p> <p><span data-i18n="72baadff28a683a6015051ad86c6e87b7f8dc3bb8f6290c9e043c26ff40a8c72/2f" data-source="This means that you can do" onmousemove="i18n(this)">&Ecy;&tcy;&ocy; &ocy;&zcy;&ncy;&acy;&chcy;&acy;&iecy;&tcy;, &chcy;&tcy;&ocy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy;</span></p> <div> <div> <pre class="hljs language-xml">$ git read-tree -m <span class="hljs-tag">&lt;<span class="hljs-name">tree1</span>&gt;</span> <span class="hljs-tag">&lt;<span class="hljs-name">tree2</span>&gt;</span> <span class="hljs-tag">&lt;<span class="hljs-name">tree3</span>&gt;</span></pre> </div> </div> <p><span data-i18n="687facaf599231feb79c0e8e8e1a97b4c1012ede9a881a78544ec14c5801c29d/93" data-source="and you will end up with an index with all of the &amp;lt;tree1&amp;gt; entries in &amp;quot;stage1&amp;quot;, all of the &amp;lt;tree2&amp;gt; entries in &amp;quot;stage2&amp;quot; and all of the &amp;lt;tree3&amp;gt; entries in &amp;quot;stage3&amp;quot;. When performing a merge of another branch into the current branch, we use the common ancestor tree as &amp;lt;tree1&amp;gt;, the current branch head as &amp;lt;tree2&amp;gt;, and the other branch head as &amp;lt;tree3&amp;gt;." onmousemove="i18n(this)">&icy; &vcy; &icy;&tcy;&ocy;&gcy;&iecy; &vcy;&ycy; &pcy;&ocy;&lcy;&ucy;&chcy;&icy;&tcy;&iecy; &icy;&ncy;&dcy;&iecy;&kcy;&scy; &scy;&ocy; &vcy;&scy;&iecy;&mcy;&icy; &zcy;&acy;&pcy;&icy;&scy;&yacy;&mcy;&icy; &lt;tree1&gt; &vcy;  &quot;stage1&quot; , &vcy;&scy;&iecy;&mcy;&icy; &zcy;&acy;&pcy;&icy;&scy;&yacy;&mcy;&icy; &lt;tree2&gt; &vcy;  &quot;stage2&quot;  &icy; &vcy;&scy;&iecy;&mcy;&icy; &zcy;&acy;&pcy;&icy;&scy;&yacy;&mcy;&icy; &lt;tree3&gt; &vcy;  &quot;stage3&quot; . &Pcy;&rcy;&icy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&icy; &dcy;&rcy;&ucy;&gcy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&icy; &scy; &tcy;&iecy;&kcy;&ucy;&shchcy;&iecy;&jcy; &vcy;&iecy;&tcy;&vcy;&softcy;&yucy; &mcy;&ycy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&mcy; &ocy;&bcy;&shchcy;&iecy;&iecy; &pcy;&rcy;&iecy;&dcy;&kcy;&ocy;&vcy;&ocy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &kcy;&acy;&kcy; &lt;&dcy;&iecy;&rcy;&iecy;&vcy;&ocy;1&gt;, &tcy;&iecy;&kcy;&ucy;&shchcy;&icy;&jcy; &zcy;&acy;&gcy;&ocy;&lcy;&ocy;&vcy;&ocy;&kcy; &vcy;&iecy;&tcy;&kcy;&icy; &kcy;&acy;&kcy; &lt;&dcy;&iecy;&rcy;&iecy;&vcy;&ocy;2&gt; &icy; &dcy;&rcy;&ucy;&gcy;&ocy;&jcy; &zcy;&acy;&gcy;&ocy;&lcy;&ocy;&vcy;&ocy;&kcy; &vcy;&iecy;&tcy;&kcy;&icy; &kcy;&acy;&kcy; &lt;&dcy;&iecy;&rcy;&iecy;&vcy;&ocy;3&gt;.</span></p> <p><span data-i18n="238a93fbd2112015b86e54849283ccf6a963605ef2bd5f6d41dbf1182c8f8fd6/c5" data-source="Furthermore, &lt;code&gt;git read-tree&lt;/code&gt; has special-case logic that says: if you see a file that matches in all respects in the following states, it &amp;quot;collapses&amp;quot; back to &amp;quot;stage0&amp;quot;:" onmousemove="i18n(this)">&Kcy;&rcy;&ocy;&mcy;&iecy; &tcy;&ocy;&gcy;&ocy;,  <code>git read-tree</code>  &icy;&mcy;&iecy;&iecy;&tcy; &lcy;&ocy;&gcy;&icy;&kcy;&ucy; &ocy;&scy;&ocy;&bcy;&ocy;&gcy;&ocy; &scy;&lcy;&ucy;&chcy;&acy;&yacy;, &kcy;&ocy;&tcy;&ocy;&rcy;&acy;&yacy; &gcy;&lcy;&acy;&scy;&icy;&tcy;: &iecy;&scy;&lcy;&icy; &vcy;&ycy; &vcy;&icy;&dcy;&icy;&tcy;&iecy; &fcy;&acy;&jcy;&lcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &vcy;&ocy; &vcy;&scy;&iecy;&khcy; &ocy;&tcy;&ncy;&ocy;&shcy;&iecy;&ncy;&icy;&yacy;&khcy; &vcy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&icy;&khcy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&yacy;&khcy;, &ocy;&ncy;  &quot;collapses&quot;  &vcy;&ocy;&zcy;&vcy;&rcy;&acy;&shchcy;&acy;&iecy;&tcy;&scy;&yacy; &kcy;  &quot;stage0&quot; :</span></p> <div> <ul> <li> <p><span data-i18n="ce5011e0e0144859aba368d24592abe9a74404ae9b068ce23a0d03418233c398/01" data-source="stage 2 and 3 are the same; take one or the other (it makes no difference - the same work has been done on our branch in stage 2 and their branch in stage 3)" onmousemove="i18n(this)">2 &icy; 3 &ecy;&tcy;&acy;&pcy;&ycy; &ocy;&dcy;&icy;&ncy;&acy;&kcy;&ocy;&vcy;&ycy;; &vcy;&zcy;&yacy;&tcy;&softcy; &tcy;&ocy; &icy;&lcy;&icy; &dcy;&rcy;&ucy;&gcy;&ocy;&iecy; (&bcy;&iecy;&zcy; &rcy;&acy;&zcy;&ncy;&icy;&tscy;&ycy; - &ncy;&acy; &ncy;&acy;&shcy;&iecy;&jcy; &vcy;&iecy;&tcy;&kcy;&iecy; &ncy;&acy; 2 &ecy;&tcy;&acy;&pcy;&iecy; &icy; &ncy;&acy; &icy;&khcy; &vcy;&iecy;&tcy;&kcy;&iecy; &ncy;&acy; 3 &ecy;&tcy;&acy;&pcy;&iecy; &pcy;&rcy;&ocy;&dcy;&iecy;&lcy;&acy;&ncy;&acy; &ocy;&dcy;&ncy;&acy; &icy; &tcy;&acy; &zhcy;&iecy; &rcy;&acy;&bcy;&ocy;&tcy;&acy;)</span></p> </li> <li> <p><span data-i18n="474a3df59724e137142b1aebc9c6f1c0032ac3b88d85fa124a97c5b2efd2dd9d/79" data-source="stage 1 and stage 2 are the same and stage 3 is different; take stage 3 (our branch in stage 2 did not do anything since the ancestor in stage 1 while their branch in stage 3 worked on it)" onmousemove="i18n(this)">&ecy;&tcy;&acy;&pcy; 1 &icy; &ecy;&tcy;&acy;&pcy; 2 &ocy;&dcy;&icy;&ncy;&acy;&kcy;&ocy;&vcy;&ycy;, &acy; &ecy;&tcy;&acy;&pcy; 3 &ocy;&tcy;&lcy;&icy;&chcy;&acy;&iecy;&tcy;&scy;&yacy;; &vcy;&zcy;&yacy;&tcy;&softcy; &ecy;&tcy;&acy;&pcy; 3 (&ncy;&acy;&shcy;&acy; &vcy;&iecy;&tcy;&kcy;&acy; &ncy;&acy; &ecy;&tcy;&acy;&pcy;&iecy; 2 &ncy;&icy;&chcy;&iecy;&gcy;&ocy; &ncy;&iecy; &dcy;&iecy;&lcy;&acy;&lcy;&acy;, &tcy;&acy;&kcy; &kcy;&acy;&kcy; &pcy;&rcy;&iecy;&dcy;&ocy;&kcy; &ncy;&acy; &ecy;&tcy;&acy;&pcy;&iecy; 1 &pcy;&ocy;&kcy;&acy; &ncy;&acy;&dcy; &ncy;&icy;&mcy; &rcy;&acy;&bcy;&ocy;&tcy;&acy;&lcy; &icy;&khcy; &fcy;&icy;&lcy;&icy;&acy;&lcy; &ncy;&acy; &ecy;&tcy;&acy;&pcy;&iecy; 3)</span></p> </li> <li> <p><span data-i18n="0aeca69767ddecb27707bde72def2824c524e36fc74fd2498549c1ddaddbfb29/0b" data-source="stage 1 and stage 3 are the same and stage 2 is different take stage 2 (we did something while they did nothing)" onmousemove="i18n(this)">&ecy;&tcy;&acy;&pcy; 1 &icy; &ecy;&tcy;&acy;&pcy; 3 &ocy;&dcy;&icy;&ncy;&acy;&kcy;&ocy;&vcy;&ycy;, &acy; &ecy;&tcy;&acy;&pcy; 2 &ocy;&tcy;&lcy;&icy;&chcy;&acy;&iecy;&tcy;&scy;&yacy;, &vcy;&ocy;&zcy;&softcy;&mcy;&iecy;&mcy; &ecy;&tcy;&acy;&pcy; 2 (&mcy;&ycy; &chcy;&tcy;&ocy;-&tcy;&ocy; &scy;&dcy;&iecy;&lcy;&acy;&lcy;&icy;, &acy; &ocy;&ncy;&icy; &ncy;&icy;&chcy;&iecy;&gcy;&ocy; &ncy;&iecy; &scy;&dcy;&iecy;&lcy;&acy;&lcy;&icy;)</span></p> </li> </ul> </div> <p><span data-i18n="054f8d731a686ad79b7026c77e07d924874362271a6936bd95d05fac33b6cb12/01" data-source="The &lt;code&gt;git write-tree&lt;/code&gt; command refuses to write a nonsensical tree, and it will complain about unmerged entries if it sees a single entry that is not stage 0." onmousemove="i18n(this)">&Kcy;&ocy;&mcy;&acy;&ncy;&dcy;&acy;  <code>git write-tree</code>  &ocy;&tcy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy; &zcy;&acy;&pcy;&icy;&scy;&ycy;&vcy;&acy;&tcy;&softcy; &bcy;&iecy;&scy;&scy;&mcy;&ycy;&scy;&lcy;&iecy;&ncy;&ncy;&ocy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &icy; &bcy;&ucy;&dcy;&iecy;&tcy; &zhcy;&acy;&lcy;&ocy;&vcy;&acy;&tcy;&softcy;&scy;&yacy; &ncy;&acy; &ncy;&iecy;&ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&iocy;&ncy;&ncy;&ycy;&iecy; &zcy;&acy;&pcy;&icy;&scy;&icy;, &iecy;&scy;&lcy;&icy; &ucy;&vcy;&icy;&dcy;&icy;&tcy; &ocy;&dcy;&ncy;&ucy; &zcy;&acy;&pcy;&icy;&scy;&softcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&acy;&yacy; &ncy;&iecy; &ncy;&acy;&khcy;&ocy;&dcy;&icy;&tcy;&scy;&yacy; &ncy;&acy; &ecy;&tcy;&acy;&pcy;&iecy; 0.</span></p> <p><span data-i18n="9b8db70298efe7382bde4d2f9ed261c8aa3f3696154fecb73f1a2fc529dc6ebd/92" data-source="OK, this all sounds like a collection of totally nonsensical rules, but it&amp;rsquo;s actually exactly what you want in order to do a fast merge. The different stages represent the &amp;quot;result tree&amp;quot; (stage 0, aka &amp;quot;merged&amp;quot;), the original tree (stage 1, aka &amp;quot;orig&amp;quot;), and the two trees you are trying to merge (stage 2 and 3 respectively)." onmousemove="i18n(this)">&KHcy;&ocy;&rcy;&ocy;&shcy;&ocy;, &vcy;&scy;&iecy; &ecy;&tcy;&ocy; &zcy;&vcy;&ucy;&chcy;&icy;&tcy; &kcy;&acy;&kcy; &ncy;&acy;&bcy;&ocy;&rcy; &scy;&ocy;&vcy;&iecy;&rcy;&shcy;&iecy;&ncy;&ncy;&ocy; &bcy;&iecy;&scy;&scy;&mcy;&ycy;&scy;&lcy;&iecy;&ncy;&ncy;&ycy;&khcy; &pcy;&rcy;&acy;&vcy;&icy;&lcy;, &ncy;&ocy; &ncy;&acy; &scy;&acy;&mcy;&ocy;&mcy; &dcy;&iecy;&lcy;&iecy; &ecy;&tcy;&ocy; &icy;&mcy;&iecy;&ncy;&ncy;&ocy; &tcy;&ocy;, &chcy;&tcy;&ocy; &vcy;&acy;&mcy; &ncy;&ucy;&zhcy;&ncy;&ocy; &dcy;&lcy;&yacy; &bcy;&ycy;&scy;&tcy;&rcy;&ocy;&gcy;&ocy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy;. &Rcy;&acy;&zcy;&lcy;&icy;&chcy;&ncy;&ycy;&iecy; &ecy;&tcy;&acy;&pcy;&ycy; &pcy;&rcy;&iecy;&dcy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&yucy;&tcy; &scy;&ocy;&bcy;&ocy;&jcy;  &quot;result tree&quot;  (&ecy;&tcy;&acy;&pcy; 0, &ocy;&ncy; &zhcy;&iecy;  &quot;merged&quot; ), &icy;&scy;&khcy;&ocy;&dcy;&ncy;&ocy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; (&ecy;&tcy;&acy;&pcy; 1, &ocy;&ncy; &zhcy;&iecy;  &quot;orig&quot; ) &icy; &dcy;&vcy;&acy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &vcy;&ycy; &pcy;&ycy;&tcy;&acy;&iecy;&tcy;&iecy;&scy;&softcy; &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&icy;&tcy;&softcy; (&ecy;&tcy;&acy;&pcy;&ycy; 2 &icy; 3 &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&ocy;).</span></p> <p><span data-i18n="ab2091e38f4a6a52e9561914d9463b9b8f66fdc33156fc00eee689ba2441534b/68" data-source="The order of stages 1, 2 and 3 (hence the order of three &amp;lt;tree-ish&amp;gt; command-line arguments) are significant when you start a 3-way merge with an index file that is already populated. Here is an outline of how the algorithm works:" onmousemove="i18n(this)">&Pcy;&ocy;&rcy;&yacy;&dcy;&ocy;&kcy; &ecy;&tcy;&acy;&pcy;&ocy;&vcy; 1, 2 &icy; 3 (&scy;&lcy;&iecy;&dcy;&ocy;&vcy;&acy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy;, &pcy;&ocy;&rcy;&yacy;&dcy;&ocy;&kcy; &tcy;&rcy;&iecy;&khcy; &acy;&rcy;&gcy;&ucy;&mcy;&iecy;&ncy;&tcy;&ocy;&vcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ncy;&ocy;&jcy; &scy;&tcy;&rcy;&ocy;&kcy;&icy; &lt;tree-ish&gt;) &vcy;&acy;&zhcy;&iecy;&ncy;, &kcy;&ocy;&gcy;&dcy;&acy; &vcy;&ycy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;&acy;&iecy;&tcy;&iecy; &tcy;&rcy;&iecy;&khcy;&scy;&tcy;&ocy;&rcy;&ocy;&ncy;&ncy;&iecy;&iecy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; &scy; &ucy;&zhcy;&iecy; &zcy;&acy;&pcy;&ocy;&lcy;&ncy;&iecy;&ncy;&ncy;&ycy;&mcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ycy;&mcy; &fcy;&acy;&jcy;&lcy;&ocy;&mcy;. &Vcy;&ocy;&tcy; &kcy;&rcy;&acy;&tcy;&kcy;&ocy;&iecy; &ocy;&pcy;&icy;&scy;&acy;&ncy;&icy;&iecy; &tcy;&ocy;&gcy;&ocy;, &kcy;&acy;&kcy; &rcy;&acy;&bcy;&ocy;&tcy;&acy;&iecy;&tcy; &acy;&lcy;&gcy;&ocy;&rcy;&icy;&tcy;&mcy;:</span></p> <div> <ul> <li> <p><span data-i18n="637ab75deecf20be117df939cd960fd38271ed6791fcc6303dc3552e9abc352c/d2" data-source="if a file exists in identical format in all three trees, it will automatically collapse to &amp;quot;merged&amp;quot; state by &lt;code&gt;git read-tree&lt;/code&gt;." onmousemove="i18n(this)">&iecy;&scy;&lcy;&icy; &fcy;&acy;&jcy;&lcy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &vcy; &ocy;&dcy;&icy;&ncy;&acy;&kcy;&ocy;&vcy;&ocy;&mcy; &fcy;&ocy;&rcy;&mcy;&acy;&tcy;&iecy; &vcy;&ocy; &vcy;&scy;&iecy;&khcy; &tcy;&rcy;&iecy;&khcy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&yacy;&khcy;, &ocy;&ncy; &acy;&vcy;&tcy;&ocy;&mcy;&acy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&icy; &scy;&vcy;&iecy;&rcy;&ncy;&iecy;&tcy;&scy;&yacy; &dcy;&ocy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&yacy;  &quot;merged&quot;  &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>git read-tree</code> .</span></p> </li> <li> <p><span data-i18n="fbc0c48997b6e66ce6b85fa64d9b787d448ecb4abbfc43d98830b553165de4bb/d0" data-source="a file that has &lt;code&gt;any&lt;/code&gt; difference what-so-ever in the three trees will stay as separate entries in the index. It&amp;rsquo;s up to &amp;quot;porcelain policy&amp;quot; to determine how to remove the non-0 stages, and insert a merged version." onmousemove="i18n(this)">&fcy;&acy;&jcy;&lcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &icy;&mcy;&iecy;&iecy;&tcy; &rcy;&acy;&zcy;&ncy;&icy;&tscy;&ucy;  <code>any</code>  &vcy; &tcy;&rcy;&iecy;&khcy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&yacy;&khcy;, &ocy;&scy;&tcy;&acy;&ncy;&iecy;&tcy;&scy;&yacy; &vcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&iecy; &kcy;&acy;&kcy; &ocy;&tcy;&dcy;&iecy;&lcy;&softcy;&ncy;&ycy;&iecy; &zcy;&acy;&pcy;&icy;&scy;&icy;.  &quot;porcelain policy&quot;  &dcy;&ocy;&lcy;&zhcy;&iecy;&ncy; &ocy;&pcy;&rcy;&iecy;&dcy;&iecy;&lcy;&icy;&tcy;&softcy;, &kcy;&acy;&kcy; &ucy;&dcy;&acy;&lcy;&icy;&tcy;&softcy; &ecy;&tcy;&acy;&pcy;&ycy;, &ocy;&tcy;&lcy;&icy;&chcy;&ncy;&ycy;&iecy; &ocy;&tcy; 0, &icy; &vcy;&scy;&tcy;&acy;&vcy;&icy;&tcy;&softcy; &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&iecy;&ncy;&ncy;&ucy;&yucy; &vcy;&iecy;&rcy;&scy;&icy;&yucy;.</span></p> </li> <li> <p><span data-i18n="0bd9c34c7e08b81b342c2514db6fad848775aab04f732e348ea7f80d679bcd08/9b" data-source="the index file saves and restores with all this information, so you can merge things incrementally, but as long as it has entries in stages 1/2/3 (i.e., &amp;quot;unmerged entries&amp;quot;) you can&amp;rsquo;t write the result. So now the merge algorithm ends up being really simple:" onmousemove="i18n(this)">&icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ycy;&jcy; &fcy;&acy;&jcy;&lcy; &scy;&ocy;&khcy;&rcy;&acy;&ncy;&yacy;&iecy;&tcy; &icy; &vcy;&ocy;&scy;&scy;&tcy;&acy;&ncy;&acy;&vcy;&lcy;&icy;&vcy;&acy;&iecy;&tcy; &vcy;&scy;&yucy; &ecy;&tcy;&ucy; &icy;&ncy;&fcy;&ocy;&rcy;&mcy;&acy;&tscy;&icy;&yucy;, &pcy;&ocy;&ecy;&tcy;&ocy;&mcy;&ucy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&yacy;&tcy;&softcy; &ecy;&lcy;&iecy;&mcy;&iecy;&ncy;&tcy;&ycy; &pcy;&ocy;&scy;&tcy;&iecy;&pcy;&iecy;&ncy;&ncy;&ocy;, &ncy;&ocy; &pcy;&ocy;&kcy;&acy; &vcy; &ncy;&iecy;&mcy; &iecy;&scy;&tcy;&softcy; &zcy;&acy;&pcy;&icy;&scy;&icy; &ncy;&acy; &ecy;&tcy;&acy;&pcy;&acy;&khcy; 1/2/3 (&tcy;. &iecy;.  &quot;unmerged entries&quot; ), &vcy;&ycy; &ncy;&iecy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &zcy;&acy;&pcy;&icy;&scy;&acy;&tcy;&softcy; &rcy;&iecy;&zcy;&ucy;&lcy;&softcy;&tcy;&acy;&tcy;. &Icy;&tcy;&acy;&kcy;, &tcy;&iecy;&pcy;&iecy;&rcy;&softcy; &acy;&lcy;&gcy;&ocy;&rcy;&icy;&tcy;&mcy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy; &scy;&tcy;&acy;&ncy;&ocy;&vcy;&icy;&tcy;&scy;&yacy; &ocy;&chcy;&iecy;&ncy;&softcy; &pcy;&rcy;&ocy;&scy;&tcy;&ycy;&mcy;:</span></p> <div> <ul> <li> <p><span data-i18n="53bd8ba9520053ad247102d6a625c9fc8df984cb634e926f32c099372ce25f95/1c" data-source="you walk the index in order, and ignore all entries of stage 0, since they&amp;rsquo;ve already been done." onmousemove="i18n(this)">&vcy;&ycy; &pcy;&rcy;&ocy;&khcy;&ocy;&dcy;&icy;&tcy;&iecy; &icy;&ncy;&dcy;&iecy;&kcy;&scy; &pcy;&ocy; &pcy;&ocy;&rcy;&yacy;&dcy;&kcy;&ucy; &icy; &icy;&gcy;&ncy;&ocy;&rcy;&icy;&rcy;&ucy;&iecy;&tcy;&iecy; &vcy;&scy;&iecy; &zcy;&acy;&pcy;&icy;&scy;&icy; &ecy;&tcy;&acy;&pcy;&acy; 0, &pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; &ocy;&ncy;&icy; &ucy;&zhcy;&iecy; &bcy;&ycy;&lcy;&icy; &scy;&dcy;&iecy;&lcy;&acy;&ncy;&ycy;.</span></p> </li> <li> <p><span data-i18n="d6619530e0ad1688ebeabe55b6d1e1220157385925a04c8143a3e4288d9592da/b6" data-source="if you find a &amp;quot;stage1&amp;quot;, but no matching &amp;quot;stage2&amp;quot; or &amp;quot;stage3&amp;quot;, you know it&amp;rsquo;s been removed from both trees (it only existed in the original tree), and you remove that entry." onmousemove="i18n(this)">&iecy;&scy;&lcy;&icy; &vcy;&ycy; &ncy;&acy;&shcy;&lcy;&icy;  &quot;stage1&quot; , &ncy;&ocy; &ncy;&iecy; &ncy;&acy;&shcy;&lcy;&icy; &pcy;&ocy;&dcy;&khcy;&ocy;&dcy;&yacy;&shchcy;&iecy;&gcy;&ocy;  &quot;stage2&quot;  &icy;&lcy;&icy;  &quot;stage3&quot; , &vcy;&ycy; &zcy;&ncy;&acy;&iecy;&tcy;&iecy;, &chcy;&tcy;&ocy; &ocy;&ncy; &bcy;&ycy;&lcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy; &icy;&zcy; &ocy;&bcy;&ocy;&icy;&khcy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&iecy;&vcy; (&ocy;&ncy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ocy;&vcy;&acy;&lcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &vcy; &icy;&scy;&khcy;&ocy;&dcy;&ncy;&ocy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy;), &icy; &vcy;&ycy; &ucy;&dcy;&acy;&lcy;&yacy;&iecy;&tcy;&iecy; &ecy;&tcy;&ucy; &zcy;&acy;&pcy;&icy;&scy;&softcy;.</span></p> </li> <li> <p><span data-i18n="1d5326d9ae233d456e092f4623b2dbf5438d4bfa23e7cba5661a0e9ee2b31b79/9f" data-source="if you find a matching &amp;quot;stage2&amp;quot; and &amp;quot;stage3&amp;quot; tree, you remove one of them, and turn the other into a &amp;quot;stage0&amp;quot; entry. Remove any matching &amp;quot;stage1&amp;quot; entry if it exists too. .. all the normal trivial rules .." onmousemove="i18n(this)">&iecy;&scy;&lcy;&icy; &vcy;&ycy; &ncy;&acy;&jcy;&dcy;&iecy;&tcy;&iecy; &scy;&ocy;&vcy;&pcy;&acy;&dcy;&acy;&yucy;&shchcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;  &quot;stage2&quot;  &icy;  &quot;stage3&quot; , &vcy;&ycy; &ucy;&dcy;&acy;&lcy;&icy;&tcy;&iecy; &ocy;&dcy;&ncy;&ocy; &icy;&zcy; &ncy;&icy;&khcy; &icy; &pcy;&rcy;&iecy;&vcy;&rcy;&acy;&tcy;&icy;&tcy;&iecy; &dcy;&rcy;&ucy;&gcy;&ocy;&iecy; &vcy; &zcy;&acy;&pcy;&icy;&scy;&softcy;  &quot;stage0&quot; . &Ucy;&dcy;&acy;&lcy;&icy;&tcy;&iecy; &lcy;&yucy;&bcy;&ucy;&yucy; &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&ucy;&yucy;&shchcy;&ucy;&yucy; &zcy;&acy;&pcy;&icy;&scy;&softcy;  &quot;stage1&quot; , &iecy;&scy;&lcy;&icy; &ocy;&ncy;&acy; &tcy;&acy;&kcy;&zhcy;&iecy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy;. ..&vcy;&scy;&iecy; &ncy;&ocy;&rcy;&mcy;&acy;&lcy;&softcy;&ncy;&ycy;&iecy; &tcy;&rcy;&icy;&vcy;&icy;&acy;&lcy;&softcy;&ncy;&ycy;&iecy; &pcy;&rcy;&acy;&vcy;&icy;&lcy;&acy;..</span></p> </li> </ul> </div> </li> </ul> </div> <p><span data-i18n="77e67acb94f299901a024beed9838744ba337da328f6913cb506878f1a03d4f8/65" data-source="You would normally use &lt;code&gt;git merge-index&lt;/code&gt; with supplied &lt;code&gt;git merge-one-file&lt;/code&gt; to do this last step. The script updates the files in the working tree as it merges each path and at the end of a successful merge." onmousemove="i18n(this)">&Dcy;&lcy;&yacy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&iecy;&ncy;&icy;&yacy; &pcy;&ocy;&scy;&lcy;&iecy;&dcy;&ncy;&iecy;&gcy;&ocy; &shcy;&acy;&gcy;&acy; &ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&scy;&yacy;  <code>git merge-index</code>  &scy; &pcy;&ocy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&iecy;&mcy;&ycy;&mcy;  <code>git merge-one-file</code> . &Scy;&kcy;&rcy;&icy;&pcy;&tcy; &ocy;&bcy;&ncy;&ocy;&vcy;&lcy;&yacy;&iecy;&tcy; &fcy;&acy;&jcy;&lcy;&ycy; &vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy; &pcy;&rcy;&icy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&icy; &kcy;&acy;&zhcy;&dcy;&ocy;&gcy;&ocy; &pcy;&ucy;&tcy;&icy; &icy; &vcy; &kcy;&ocy;&ncy;&tscy;&iecy; &ucy;&scy;&pcy;&iecy;&shcy;&ncy;&ocy;&gcy;&ocy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy;.</span></p> <p><span data-i18n="6f8a0204dc63d5938e245a9cce91e3ce774280a1b9fac43cab1bc2acfe2d5bc5/5a" data-source="When you start a 3-way merge with an index file that is already populated, it is assumed that it represents the state of the files in your work tree, and you can even have files with changes unrecorded in the index file. It is further assumed that this state is &amp;quot;derived&amp;quot; from the stage 2 tree. The 3-way merge refuses to run if it finds an entry in the original index file that does not match stage 2." onmousemove="i18n(this)">&Kcy;&ocy;&gcy;&dcy;&acy; &vcy;&ycy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;&acy;&iecy;&tcy;&iecy; &tcy;&rcy;&iecy;&khcy;&scy;&tcy;&ocy;&rcy;&ocy;&ncy;&ncy;&iecy;&iecy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; &scy; &ucy;&zhcy;&iecy; &zcy;&acy;&pcy;&ocy;&lcy;&ncy;&iecy;&ncy;&ncy;&ycy;&mcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ycy;&mcy; &fcy;&acy;&jcy;&lcy;&ocy;&mcy;, &pcy;&rcy;&iecy;&dcy;&pcy;&ocy;&lcy;&acy;&gcy;&acy;&iecy;&tcy;&scy;&yacy;, &chcy;&tcy;&ocy; &ocy;&ncy; &pcy;&rcy;&iecy;&dcy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&iecy;&tcy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&iecy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy; &vcy; &vcy;&acy;&shcy;&iecy;&mcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy;, &icy; &vcy;&ycy; &dcy;&acy;&zhcy;&iecy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &icy;&mcy;&iecy;&tcy;&softcy; &fcy;&acy;&jcy;&lcy;&ycy; &scy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy;&mcy;&icy;, &ncy;&iecy; &zcy;&acy;&pcy;&icy;&scy;&acy;&ncy;&ncy;&ycy;&mcy;&icy; &vcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ocy;&mcy; &fcy;&acy;&jcy;&lcy;&iecy;. &Dcy;&acy;&lcy;&iecy;&iecy; &pcy;&rcy;&iecy;&dcy;&pcy;&ocy;&lcy;&acy;&gcy;&acy;&iecy;&tcy;&scy;&yacy;, &chcy;&tcy;&ocy; &ecy;&tcy;&ocy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&iecy;  &quot;derived&quot;  &icy;&zcy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &ecy;&tcy;&acy;&pcy;&acy; 2. &Tcy;&rcy;&iecy;&khcy;&scy;&tcy;&ocy;&rcy;&ocy;&ncy;&ncy;&iecy;&iecy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; &ocy;&tcy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&yacy;&tcy;&softcy;&scy;&yacy;, &iecy;&scy;&lcy;&icy; &vcy; &icy;&scy;&khcy;&ocy;&dcy;&ncy;&ocy;&mcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ocy;&mcy; &fcy;&acy;&jcy;&lcy;&iecy; &ocy;&bcy;&ncy;&acy;&rcy;&ucy;&zhcy;&icy;&vcy;&acy;&iecy;&tcy;&scy;&yacy; &zcy;&acy;&pcy;&icy;&scy;&softcy;, &ncy;&iecy; &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&ucy;&yucy;&shchcy;&acy;&yacy; &ecy;&tcy;&acy;&pcy;&ucy; 2.</span></p> <p><span data-i18n="d014cb40456403c4d26ba8a2fe94719033e02b4f11803ac0e25e328167f6fe4c/77" data-source="This is done to prevent you from losing your work-in-progress changes, and mixing your random changes in an unrelated merge commit. To illustrate, suppose you start from what has been committed last to your repository:" onmousemove="i18n(this)">&Ecy;&tcy;&ocy; &scy;&dcy;&iecy;&lcy;&acy;&ncy;&ocy; &dcy;&lcy;&yacy; &tcy;&ocy;&gcy;&ocy;, &chcy;&tcy;&ocy;&bcy;&ycy; &vcy;&ycy; &ncy;&iecy; &pcy;&ocy;&tcy;&iecy;&rcy;&yacy;&lcy;&icy; &ncy;&iecy;&zcy;&acy;&vcy;&iecy;&rcy;&shcy;&iecy;&ncy;&ncy;&ycy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy; &icy; &ncy;&iecy; &scy;&mcy;&iecy;&shcy;&acy;&lcy;&icy; &scy;&lcy;&ucy;&chcy;&acy;&jcy;&ncy;&ycy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy; &vcy; &ncy;&iecy;&scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ocy;&mcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&iecy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy;. &Dcy;&lcy;&yacy; &icy;&lcy;&lcy;&yucy;&scy;&tcy;&rcy;&acy;&tscy;&icy;&icy; &pcy;&rcy;&iecy;&dcy;&pcy;&ocy;&lcy;&ocy;&zhcy;&icy;&mcy;, &chcy;&tcy;&ocy; &vcy;&ycy; &ncy;&acy;&chcy;&icy;&ncy;&acy;&iecy;&tcy;&iecy; &scy; &tcy;&ocy;&gcy;&ocy;, &chcy;&tcy;&ocy; &bcy;&ycy;&lcy;&ocy; &zcy;&acy;&fcy;&icy;&kcy;&scy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&ocy; &vcy; &vcy;&acy;&shcy;&iecy;&mcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&icy; &pcy;&ocy;&scy;&lcy;&iecy;&dcy;&ncy;&icy;&mcy;:</span></p> <div> <div> <pre class="hljs language-shell"><span class="hljs-meta prompt_">$ </span><span class="language-bash">JC=`git rev-parse --verify <span class="hljs-string">&quot;HEAD^0&quot;</span>`</span>
<span class="hljs-meta prompt_">$ </span><span class="language-bash">git checkout-index -f -u -a <span class="hljs-variable">$JC</span></span></pre> </div> </div> <p><span data-i18n="af20862d020a4f88898d71bcced17ae376f16c9e276b38b3c90d37ff00fe85fc/be" data-source="You do random edits, without running &lt;code&gt;git update-index&lt;/code&gt;. And then you notice that the tip of your &amp;quot;upstream&amp;quot; tree has advanced since you pulled from him:" onmousemove="i18n(this)">&Vcy;&ycy; &dcy;&iecy;&lcy;&acy;&iecy;&tcy;&iecy; &scy;&lcy;&ucy;&chcy;&acy;&jcy;&ncy;&ycy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy;, &ncy;&iecy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;&acy;&yacy;  <code>git update-index</code> . &Icy; &tcy;&ucy;&tcy; &vcy;&ycy; &zcy;&acy;&mcy;&iecy;&chcy;&acy;&iecy;&tcy;&iecy;, &chcy;&tcy;&ocy; &vcy;&iecy;&rcy;&khcy;&ucy;&shcy;&kcy;&acy; &vcy;&acy;&shcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;  &quot;upstream&quot;  &vcy;&ycy;&dcy;&vcy;&icy;&ncy;&ucy;&lcy;&acy;&scy;&softcy; &vcy;&pcy;&iecy;&rcy;&iecy;&dcy; &scy; &tcy;&iecy;&khcy; &pcy;&ocy;&rcy;, &kcy;&acy;&kcy; &vcy;&ycy; &iecy;&gcy;&ocy; &vcy;&ycy;&dcy;&iecy;&rcy;&ncy;&ucy;&lcy;&icy;:</span></p> <div> <div> <pre class="hljs language-shell"><span class="hljs-meta prompt_">$ </span><span class="language-bash">git fetch git://.... linus</span>
<span class="hljs-meta prompt_">$ </span><span class="language-bash">LT=`git rev-parse FETCH_HEAD`</span></pre> </div> </div> <p><span data-i18n="aed675273462f73193940e1a2a814b9c476bb8bbf5d8f57b88d82d202f445ae1/c5" data-source="Your work tree is still based on your HEAD ($JC), but you have some edits since. Three-way merge makes sure that you have not added or modified index entries since $JC, and if you haven&amp;rsquo;t, then does the right thing. So with the following sequence:" onmousemove="i18n(this)">&Vcy;&acy;&shcy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &pcy;&ocy;-&pcy;&rcy;&iecy;&zhcy;&ncy;&iecy;&mcy;&ucy; &ocy;&scy;&ncy;&ocy;&vcy;&acy;&ncy;&ocy; &ncy;&acy; HEAD ($JC), &ncy;&ocy; &scy; &tcy;&iecy;&khcy; &pcy;&ocy;&rcy; &vcy;&ycy; &vcy;&ncy;&iecy;&scy;&lcy;&icy; &ncy;&iecy;&kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy;. &Tcy;&rcy;&iecy;&khcy;&scy;&tcy;&ocy;&rcy;&ocy;&ncy;&ncy;&iecy;&iecy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; &gcy;&acy;&rcy;&acy;&ncy;&tcy;&icy;&rcy;&ucy;&iecy;&tcy;, &chcy;&tcy;&ocy; &vcy;&ycy; &ncy;&iecy; &dcy;&ocy;&bcy;&acy;&vcy;&lcy;&yacy;&lcy;&icy; &icy; &ncy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&yacy;&lcy;&icy; &zcy;&acy;&pcy;&icy;&scy;&icy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy; &pcy;&ocy;&scy;&lcy;&iecy; $JC, &acy; &iecy;&scy;&lcy;&icy; &vcy;&ycy; &ecy;&tcy;&ocy;&gcy;&ocy; &ncy;&iecy; &scy;&dcy;&iecy;&lcy;&acy;&lcy;&icy;, &tcy;&ocy; &pcy;&ocy;&scy;&tcy;&ucy;&pcy;&acy;&iecy;&tcy; &pcy;&rcy;&acy;&vcy;&icy;&lcy;&softcy;&ncy;&ocy;. &Icy;&tcy;&acy;&kcy;, &vcy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&iecy;&jcy; &pcy;&ocy;&scy;&lcy;&iecy;&dcy;&ocy;&vcy;&acy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy;&scy;&tcy;&icy;:</span></p> <div> <div> <pre class="hljs language-shell"><span class="hljs-meta prompt_">$ </span><span class="language-bash">git read-tree -m -u `git merge-base <span class="hljs-variable">$JC</span> <span class="hljs-variable">$LT</span>` <span class="hljs-variable">$JC</span> <span class="hljs-variable">$LT</span></span>
<span class="hljs-meta prompt_">$ </span><span class="language-bash">git merge-index git-merge-one-file -a</span>
<span class="hljs-meta prompt_">$ </span><span class="language-bash"><span class="hljs-built_in">echo</span> <span class="hljs-string">&quot;Merge with Linus&quot;</span> | \
  git commit-tree `git write-tree` -p <span class="hljs-variable">$JC</span> -p <span class="hljs-variable">$LT</span></span></pre> </div> </div> <p><span data-i18n="7fc79ce16281da935921b92f3b23466e462a78464076e021177c2dc22653f779/80" data-source="what you would commit is a pure merge between $JC and $LT without your work-in-progress changes, and your work tree would be updated to the result of the merge." onmousemove="i18n(this)">&tcy;&ocy;, &chcy;&tcy;&ocy; &vcy;&ycy; &bcy;&ycy; &zcy;&acy;&fcy;&icy;&kcy;&scy;&icy;&rcy;&ocy;&vcy;&acy;&lcy;&icy;, - &ecy;&tcy;&ocy; &chcy;&icy;&scy;&tcy;&ocy;&iecy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; $JC &icy; $LT &bcy;&iecy;&zcy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&jcy; &ncy;&iecy;&zcy;&acy;&vcy;&iecy;&rcy;&shcy;&iecy;&ncy;&ncy;&ocy;&jcy; &rcy;&acy;&bcy;&ocy;&tcy;&ycy;, &icy; &vcy;&acy;&shcy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &bcy;&ucy;&dcy;&iecy;&tcy; &ocy;&bcy;&ncy;&ocy;&vcy;&lcy;&iecy;&ncy;&ocy; &vcy; &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&icy;&icy; &scy; &rcy;&iecy;&zcy;&ucy;&lcy;&softcy;&tcy;&acy;&tcy;&ocy;&mcy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy;.</span></p> <p><span data-i18n="6fbecff0d8c6eb1871b7162642c957ab9fb705b04b0478f4d74cf4cf024db537/3c" data-source="However, if you have local changes in the working tree that would be overwritten by this merge, &lt;code&gt;git read-tree&lt;/code&gt; will refuse to run to prevent your changes from being lost." onmousemove="i18n(this)">&Ocy;&dcy;&ncy;&acy;&kcy;&ocy; &iecy;&scy;&lcy;&icy; &ucy; &vcy;&acy;&scy; &iecy;&scy;&tcy;&softcy; &lcy;&ocy;&kcy;&acy;&lcy;&softcy;&ncy;&ycy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy; &vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &bcy;&ucy;&dcy;&ucy;&tcy; &pcy;&iecy;&rcy;&iecy;&zcy;&acy;&pcy;&icy;&scy;&acy;&ncy;&ycy; &vcy; &rcy;&iecy;&zcy;&ucy;&lcy;&softcy;&tcy;&acy;&tcy;&iecy; &ecy;&tcy;&ocy;&gcy;&ocy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy;,  <code>git read-tree</code>  &ocy;&tcy;&kcy;&acy;&zhcy;&iecy;&tcy;&scy;&yacy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;&acy;&tcy;&softcy;&scy;&yacy;, &chcy;&tcy;&ocy;&bcy;&ycy; &pcy;&rcy;&iecy;&dcy;&ocy;&tcy;&vcy;&rcy;&acy;&tcy;&icy;&tcy;&softcy; &pcy;&ocy;&tcy;&iecy;&rcy;&yucy; &vcy;&acy;&shcy;&icy;&khcy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&jcy;.</span></p> <p><span data-i18n="ec15e97ccb18573951e02461faa6a2a6bb5f7925c34184fa3d800beb81c91642/30" data-source="In other words, there is no need to worry about what exists only in the working tree. When you have local changes in a part of the project that is not involved in the merge, your changes do not interfere with the merge, and are kept intact. When they &lt;strong&gt;do&lt;/strong&gt; interfere, the merge does not even start (&lt;code&gt;git read-tree&lt;/code&gt; complains loudly and fails without modifying anything). In such a case, you can simply continue doing what you were in the middle of doing, and when your working tree is ready (i.e. you have finished your work-in-progress), attempt the merge again." onmousemove="i18n(this)">&Dcy;&rcy;&ucy;&gcy;&icy;&mcy;&icy; &scy;&lcy;&ocy;&vcy;&acy;&mcy;&icy;, &ncy;&iecy; &ncy;&ucy;&zhcy;&ncy;&ocy; &bcy;&iecy;&scy;&pcy;&ocy;&kcy;&ocy;&icy;&tcy;&softcy;&scy;&yacy; &ocy; &tcy;&ocy;&mcy;, &chcy;&tcy;&ocy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy;. &IEcy;&scy;&lcy;&icy; &ucy; &vcy;&acy;&scy; &iecy;&scy;&tcy;&softcy; &lcy;&ocy;&kcy;&acy;&lcy;&softcy;&ncy;&ycy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy; &vcy; &chcy;&acy;&scy;&tcy;&icy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy;, &kcy;&ocy;&tcy;&ocy;&rcy;&acy;&yacy; &ncy;&iecy; &ucy;&chcy;&acy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &vcy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&icy;, &vcy;&acy;&shcy;&icy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy; &ncy;&iecy; &mcy;&iecy;&shcy;&acy;&yucy;&tcy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yucy; &icy; &ocy;&scy;&tcy;&acy;&yucy;&tcy;&scy;&yacy; &ncy;&iecy;&icy;&zcy;&mcy;&iecy;&ncy;&ncy;&ycy;&mcy;&icy;. &Kcy;&ocy;&gcy;&dcy;&acy; &ocy;&ncy;&icy; &mcy;&iecy;&shcy;&acy;&yucy;&tcy;, &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; &dcy;&acy;&zhcy;&iecy; &ncy;&iecy; &ncy;&acy;&chcy;&icy;&ncy;&acy;&iecy;&tcy;&scy;&yacy; ( <code>git read-tree</code>  &gcy;&rcy;&ocy;&mcy;&kcy;&ocy; &zhcy;&acy;&lcy;&ucy;&iecy;&tcy;&scy;&yacy; &icy; &vcy;&ycy;&khcy;&ocy;&dcy;&icy;&tcy; &icy;&zcy; &scy;&tcy;&rcy;&ocy;&yacy;, &ncy;&icy;&chcy;&iecy;&gcy;&ocy; &ncy;&iecy; &mcy;&ocy;&dcy;&icy;&fcy;&icy;&tscy;&icy;&rcy;&ucy;&yacy;). &Vcy; &tcy;&acy;&kcy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &pcy;&rcy;&ocy;&dcy;&ocy;&lcy;&zhcy;&acy;&tcy;&softcy; &dcy;&iecy;&lcy;&acy;&tcy;&softcy; &tcy;&ocy;, &chcy;&tcy;&ocy; &vcy;&ycy; &dcy;&iecy;&lcy;&acy;&lcy;&icy; &vcy; &scy;&iecy;&rcy;&iecy;&dcy;&icy;&ncy;&iecy;, &icy; &kcy;&ocy;&gcy;&dcy;&acy; &vcy;&acy;&shcy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &bcy;&ucy;&dcy;&iecy;&tcy; &gcy;&ocy;&tcy;&ocy;&vcy;&ocy; (&tcy;. &iecy;. &vcy;&ycy; &zcy;&acy;&kcy;&ocy;&ncy;&chcy;&icy;&tcy;&iecy; &ncy;&iecy;&zcy;&acy;&vcy;&iecy;&rcy;&shcy;&iecy;&ncy;&ncy;&ucy;&yucy; &rcy;&acy;&bcy;&ocy;&tcy;&ucy;), &pcy;&ocy;&pcy;&ycy;&tcy;&acy;&jcy;&tcy;&iecy;&scy;&softcy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&softcy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; &iecy;&shchcy;&iecy; &rcy;&acy;&zcy;.</span></p> </div> </div> <h2 class="text-body-emphasis"  id="_sparse_checkout"><span data-i18n="8203f7033fb46f28b3e1d1545116377ce0e83fec0dcd6b2336bec3fae1ac0e1d/04" data-source="Sparse checkout" onmousemove="i18n(this)">Sparse checkout</span></h2> <div> <p><span data-i18n="4bb6a66d010d15efb05c64d8311a6672b8f44fbc67590f5d9a4bd7c71f3faf76/f4" data-source="Note: The skip-worktree capabilities in &lt;a href=&quot;git-update-index&quot;&gt;git-update-index[1]&lt;/a&gt; and &lt;code&gt;read-tree&lt;/code&gt; predated the introduction of &lt;a href=&quot;git-sparse-checkout&quot;&gt;git-sparse-checkout[1]&lt;/a&gt;. Users are encouraged to use the &lt;code&gt;sparse-checkout&lt;/code&gt; command in preference to these plumbing commands for sparse-checkout/skip-worktree related needs. However, the information below might be useful to users trying to understand the pattern style used in non-cone mode of the &lt;code&gt;sparse-checkout&lt;/code&gt; command." onmousemove="i18n(this)">&Pcy;&rcy;&icy;&mcy;&iecy;&chcy;&acy;&ncy;&icy;&iecy;. &Vcy;&ocy;&zcy;&mcy;&ocy;&zhcy;&ncy;&ocy;&scy;&tcy;&icy; &pcy;&rcy;&ocy;&pcy;&ucy;&scy;&kcy;&acy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &vcy;  <a href="git-update-index.html">git-update-index[1]</a>  &icy;  <code>read-tree</code>  &pcy;&ocy;&yacy;&vcy;&icy;&lcy;&icy;&scy;&softcy; &dcy;&ocy; &pcy;&ocy;&yacy;&vcy;&lcy;&iecy;&ncy;&icy;&yacy;  <a href="git-sparse-checkout.html">git-sparse-checkout[1]</a> . &Pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&iecy;&lcy;&yacy;&mcy; &rcy;&iecy;&kcy;&ocy;&mcy;&iecy;&ncy;&dcy;&ucy;&iecy;&tcy;&scy;&yacy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ucy;  <code>sparse-checkout</code>  &vcy;&mcy;&iecy;&scy;&tcy;&ocy; &ecy;&tcy;&icy;&khcy; &scy;&acy;&ncy;&tcy;&iecy;&khcy;&ncy;&icy;&chcy;&iecy;&scy;&kcy;&icy;&khcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy; &dcy;&lcy;&yacy; &ncy;&ucy;&zhcy;&dcy;, &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ycy;&khcy; &scy; &rcy;&acy;&zcy;&rcy;&iecy;&zhcy;&iecy;&ncy;&ncy;&ocy;&jcy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&kcy;&ocy;&jcy;/&pcy;&rcy;&ocy;&pcy;&ucy;&scy;&kcy;&ocy;&mcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;. &Ocy;&dcy;&ncy;&acy;&kcy;&ocy; &icy;&ncy;&fcy;&ocy;&rcy;&mcy;&acy;&tscy;&icy;&yacy; &ncy;&icy;&zhcy;&iecy; &mcy;&ocy;&zhcy;&iecy;&tcy; &bcy;&ycy;&tcy;&softcy; &pcy;&ocy;&lcy;&iecy;&zcy;&ncy;&acy; &pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&iecy;&lcy;&yacy;&mcy;, &pcy;&ycy;&tcy;&acy;&yucy;&shchcy;&icy;&mcy;&scy;&yacy; &pcy;&ocy;&ncy;&yacy;&tcy;&softcy; &scy;&tcy;&icy;&lcy;&softcy; &ucy;&zcy;&ocy;&rcy;&acy;, &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&mcy;&ycy;&jcy; &vcy; &ncy;&iecy;&kcy;&ocy;&ncy;&ucy;&scy;&ncy;&ocy;&mcy; &rcy;&iecy;&zhcy;&icy;&mcy;&iecy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy;  <code>sparse-checkout</code> .</span></p> <p><span data-i18n="b40fdc630f0e538dba02c7b2bfff361ed71ce7606c5c49d3371c8610b6a6afab/12" data-source="&amp;quot;Sparse checkout&amp;quot; allows populating the working directory sparsely. It uses the skip-worktree bit (see &lt;a href=&quot;git-update-index&quot;&gt;git-update-index[1]&lt;/a&gt;) to tell Git whether a file in the working directory is worth looking at." onmousemove="i18n(this)">&quot;Sparse checkout&quot;  &pcy;&ocy;&zcy;&vcy;&ocy;&lcy;&yacy;&iecy;&tcy; &rcy;&acy;&zcy;&rcy;&iecy;&zhcy;&iecy;&ncy;&ncy;&ocy; &zcy;&acy;&pcy;&ocy;&lcy;&ncy;&yacy;&tcy;&softcy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&jcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;. &Ocy;&ncy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy; &bcy;&icy;&tcy; Skip-worktree (&scy;&mcy;.  <a href="git-update-index.html">git-update-index[1]</a> ), &chcy;&tcy;&ocy;&bcy;&ycy; &scy;&ocy;&ocy;&bcy;&shchcy;&icy;&tcy;&softcy;  Git , &scy;&tcy;&ocy;&icy;&tcy; &lcy;&icy; &pcy;&rcy;&ocy;&scy;&mcy;&acy;&tcy;&rcy;&icy;&vcy;&acy;&tcy;&softcy; &fcy;&acy;&jcy;&lcy; &vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&iecy;.</span></p> <p><span data-i18n="edaf42055ab40f814933a72a78bd6c6fba19b6f76836c26e6411c0eddd64bcf6/52" data-source="&lt;code&gt;git read-tree&lt;/code&gt; and other merge-based commands (&lt;code&gt;git merge&lt;/code&gt;, &lt;code&gt;git checkout&lt;/code&gt;&amp;hellip;&amp;ZeroWidthSpace;) can help maintaining the skip-worktree bitmap and working directory update. &lt;code&gt;$GIT_DIR/info/sparse-checkout&lt;/code&gt; is used to define the skip-worktree reference bitmap. When &lt;code&gt;git read-tree&lt;/code&gt; needs to update the working directory, it resets the skip-worktree bit in the index based on this file, which uses the same syntax as .gitignore files. If an entry matches a pattern in this file, or the entry corresponds to a file present in the working tree, then skip-worktree will not be set on that entry. Otherwise, skip-worktree will be set." onmousemove="i18n(this)"><code>git read-tree</code>  &icy; &dcy;&rcy;&ucy;&gcy;&icy;&iecy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy; &ncy;&acy; &ocy;&scy;&ncy;&ocy;&vcy;&iecy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy; (  <code>git merge</code>  ,  <code>git checkout</code> &hellip;&ZeroWidthSpace;) &mcy;&ocy;&gcy;&ucy;&tcy; &pcy;&ocy;&mcy;&ocy;&chcy;&softcy; &pcy;&ocy;&dcy;&dcy;&iecy;&rcy;&zhcy;&icy;&vcy;&acy;&tcy;&softcy; &rcy;&acy;&scy;&tcy;&rcy;&ocy;&vcy;&ocy;&iecy; &icy;&zcy;&ocy;&bcy;&rcy;&acy;&zhcy;&iecy;&ncy;&icy;&iecy; &pcy;&rcy;&ocy;&pcy;&ucy;&scy;&kcy;&acy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &icy; &ocy;&bcy;&ncy;&ocy;&vcy;&lcy;&iecy;&ncy;&icy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&acy;.  <code>$GIT_DIR/info/sparse-checkout</code>  &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&scy;&yacy; &dcy;&lcy;&yacy; &ocy;&pcy;&rcy;&iecy;&dcy;&iecy;&lcy;&iecy;&ncy;&icy;&yacy; &ecy;&tcy;&acy;&lcy;&ocy;&ncy;&ncy;&ocy;&gcy;&ocy; &rcy;&acy;&scy;&tcy;&rcy;&ocy;&vcy;&ocy;&gcy;&ocy; &icy;&zcy;&ocy;&bcy;&rcy;&acy;&zhcy;&iecy;&ncy;&icy;&yacy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &pcy;&rcy;&ocy;&pcy;&ucy;&scy;&kcy;&acy;. &Kcy;&ocy;&gcy;&dcy;&acy;  <code>git read-tree</code>  &ncy;&iecy;&ocy;&bcy;&khcy;&ocy;&dcy;&icy;&mcy;&ocy; &ocy;&bcy;&ncy;&ocy;&vcy;&icy;&tcy;&softcy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&jcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;, &ocy;&ncy; &scy;&bcy;&rcy;&acy;&scy;&ycy;&vcy;&acy;&iecy;&tcy; &bcy;&icy;&tcy; Skip-worktree &vcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&iecy; &ncy;&acy; &ocy;&scy;&ncy;&ocy;&vcy;&iecy; &ecy;&tcy;&ocy;&gcy;&ocy; &fcy;&acy;&jcy;&lcy;&acy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy; &tcy;&ocy;&tcy; &zhcy;&iecy; &scy;&icy;&ncy;&tcy;&acy;&kcy;&scy;&icy;&scy;, &chcy;&tcy;&ocy; &icy; &fcy;&acy;&jcy;&lcy;&ycy; .gitignore. &IEcy;&scy;&lcy;&icy; &zcy;&acy;&pcy;&icy;&scy;&softcy; &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &shcy;&acy;&bcy;&lcy;&ocy;&ncy;&ucy; &vcy; &ecy;&tcy;&ocy;&mcy; &fcy;&acy;&jcy;&lcy;&iecy; &icy;&lcy;&icy; &zcy;&acy;&pcy;&icy;&scy;&softcy; &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &fcy;&acy;&jcy;&lcy;&ucy;, &pcy;&rcy;&icy;&scy;&ucy;&tcy;&scy;&tcy;&vcy;&ucy;&yucy;&shchcy;&iecy;&mcy;&ucy; &vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy;, &tcy;&ocy; Skip-worktree &ncy;&iecy; &bcy;&ucy;&dcy;&iecy;&tcy; &ucy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&lcy;&iecy;&ncy; &dcy;&lcy;&yacy; &ecy;&tcy;&ocy;&jcy; &zcy;&acy;&pcy;&icy;&scy;&icy;. &Vcy; &pcy;&rcy;&ocy;&tcy;&icy;&vcy;&ncy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; &bcy;&ucy;&dcy;&iecy;&tcy; &ucy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&lcy;&iecy;&ncy;&ocy; Skip-Worktree.</span></p> <p><span data-i18n="17e25cafb582944fc2dd27e6c312394b0101ce8f3a54ebb4c4b59fb56cfcc31a/2f" data-source="Then it compares the new skip-worktree value with the previous one. If skip-worktree turns from set to unset, it will add the corresponding file back. If it turns from unset to set, that file will be removed." onmousemove="i18n(this)">&Zcy;&acy;&tcy;&iecy;&mcy; &ocy;&ncy; &scy;&rcy;&acy;&vcy;&ncy;&icy;&vcy;&acy;&iecy;&tcy; &ncy;&ocy;&vcy;&ocy;&iecy; &zcy;&ncy;&acy;&chcy;&iecy;&ncy;&icy;&iecy; Skip-Worktree &scy; &pcy;&rcy;&iecy;&dcy;&ycy;&dcy;&ucy;&shchcy;&icy;&mcy;. &IEcy;&scy;&lcy;&icy; &pcy;&acy;&rcy;&acy;&mcy;&iecy;&tcy;&rcy; Skip-worktree &pcy;&iecy;&rcy;&iecy;&kcy;&lcy;&yucy;&chcy;&icy;&tcy;&scy;&yacy; &icy;&zcy; &ucy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&lcy;&iecy;&ncy;&ncy;&ocy;&gcy;&ocy; &vcy; &ncy;&iecy;&ucy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&lcy;&iecy;&ncy;&ncy;&ocy;&iecy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&iecy;, &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&ucy;&yucy;&shchcy;&icy;&jcy; &fcy;&acy;&jcy;&lcy; &bcy;&ucy;&dcy;&iecy;&tcy; &dcy;&ocy;&bcy;&acy;&vcy;&lcy;&iecy;&ncy; &ocy;&bcy;&rcy;&acy;&tcy;&ncy;&ocy;. &IEcy;&scy;&lcy;&icy; &ocy;&ncy; &icy;&zcy;&mcy;&iecy;&ncy;&icy;&tcy;&scy;&yacy; &scy; &ncy;&iecy;&ucy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&lcy;&iecy;&ncy;&ncy;&ocy;&gcy;&ocy; &ncy;&acy; &ucy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&lcy;&iecy;&ncy;&ncy;&ocy;&iecy;, &ecy;&tcy;&ocy;&tcy; &fcy;&acy;&jcy;&lcy; &bcy;&ucy;&dcy;&iecy;&tcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;.</span></p> <p><span data-i18n="c279f34569c15c2d5e503360287428db3087066a003b6d4df3c4e3f1b174cd82/a7" data-source="While &lt;code&gt;$GIT_DIR/info/sparse-checkout&lt;/code&gt; is usually used to specify what files are in, you can also specify what files are &lt;code&gt;not&lt;/code&gt; in, using negate patterns. For example, to remove the file &lt;code&gt;unwanted&lt;/code&gt;:" onmousemove="i18n(this)">&KHcy;&ocy;&tcy;&yacy;  <code>$GIT_DIR/info/sparse-checkout</code>  &ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&scy;&yacy; &dcy;&lcy;&yacy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;&icy;&yacy; &tcy;&ocy;&gcy;&ocy;, &vcy; &kcy;&acy;&kcy;&icy;&khcy; &fcy;&acy;&jcy;&lcy;&acy;&khcy; &ncy;&acy;&khcy;&ocy;&dcy;&icy;&tcy;&scy;&yacy;  <code>not</code> , &vcy;&ycy; &tcy;&acy;&kcy;&zhcy;&iecy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &ucy;&kcy;&acy;&zcy;&acy;&tcy;&softcy;, &vcy; &kcy;&acy;&kcy;&icy;&khcy; &fcy;&acy;&jcy;&lcy;&acy;&khcy; &ncy;&acy;&khcy;&ocy;&dcy;&icy;&tcy;&scy;&yacy;  <code>not</code> , &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&yacy; &shcy;&acy;&bcy;&lcy;&ocy;&ncy;&ycy; &ocy;&tcy;&rcy;&icy;&tscy;&acy;&ncy;&icy;&yacy;. &Ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &chcy;&tcy;&ocy;&bcy;&ycy; &ucy;&dcy;&acy;&lcy;&icy;&tcy;&softcy; &fcy;&acy;&jcy;&lcy;  <code>unwanted</code> :</span></p> <div> <div> <pre class="hljs language-diff">/*
<span class="hljs-addition">!unwanted</span></pre> </div> </div> <p><span data-i18n="db282d9e886430c258fd1b1114de98633f4a18ffa996222b914fc2cae55cd541/f9" data-source="Another tricky thing is fully repopulating the working directory when you no longer want sparse checkout. You cannot just disable &amp;quot;sparse checkout&amp;quot; because skip-worktree bits are still in the index and your working directory is still sparsely populated. You should re-populate the working directory with the &lt;code&gt;$GIT_DIR/info/sparse-checkout&lt;/code&gt; file content as follows:" onmousemove="i18n(this)">&IEcy;&shchcy;&iecy; &ocy;&dcy;&ncy;&acy; &scy;&lcy;&ocy;&zhcy;&ncy;&acy;&yacy; &vcy;&iecy;&shchcy;&softcy; &mdash; &pcy;&ocy;&lcy;&ncy;&ocy;&iecy; &pcy;&ocy;&vcy;&tcy;&ocy;&rcy;&ncy;&ocy;&iecy; &zcy;&acy;&pcy;&ocy;&lcy;&ncy;&iecy;&ncy;&icy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&acy;, &kcy;&ocy;&gcy;&dcy;&acy; &vcy;&acy;&mcy; &bcy;&ocy;&lcy;&softcy;&shcy;&iecy; &ncy;&iecy; &ncy;&ucy;&zhcy;&ncy;&acy; &rcy;&acy;&zcy;&rcy;&iecy;&zhcy;&iecy;&ncy;&ncy;&acy;&yacy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&kcy;&acy;. &Vcy;&ycy; &ncy;&iecy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &ocy;&tcy;&kcy;&lcy;&yucy;&chcy;&icy;&tcy;&softcy;  &quot;sparse checkout&quot; , &pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; &bcy;&icy;&tcy;&ycy; &pcy;&rcy;&ocy;&pcy;&ucy;&scy;&kcy;&acy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &vcy;&scy;&iecy; &iecy;&shchcy;&iecy; &ncy;&acy;&khcy;&ocy;&dcy;&yacy;&tcy;&scy;&yacy; &vcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&iecy;, &acy; &vcy;&acy;&shcy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&jcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy; &vcy;&scy;&iecy; &iecy;&shchcy;&iecy; &mcy;&acy;&lcy;&ocy;&ncy;&acy;&scy;&iecy;&lcy;&iecy;&ncy;. &Vcy;&acy;&mcy; &scy;&lcy;&iecy;&dcy;&ucy;&iecy;&tcy; &pcy;&ocy;&vcy;&tcy;&ocy;&rcy;&ncy;&ocy; &zcy;&acy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&softcy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&jcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&mcy;&ycy;&mcy; &fcy;&acy;&jcy;&lcy;&acy;  <code>$GIT_DIR/info/sparse-checkout</code>  &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&icy;&mcy; &ocy;&bcy;&rcy;&acy;&zcy;&ocy;&mcy;:</span></p> <div> <div> <pre class="hljs language-undefined">/*</pre> </div> </div> <p><span data-i18n="aa5ce2d6fcf231f7cb0314d1537c9fd8efc1d0748c3844c02734efb2de7070bb/7b" data-source="Then you can disable sparse checkout. Sparse checkout support in &lt;code&gt;git read-tree&lt;/code&gt; and similar commands is disabled by default. You need to turn &lt;code&gt;core.sparseCheckout&lt;/code&gt; on in order to have sparse checkout support." onmousemove="i18n(this)">&Zcy;&acy;&tcy;&iecy;&mcy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &ocy;&tcy;&kcy;&lcy;&yucy;&chcy;&icy;&tcy;&softcy; &rcy;&acy;&zcy;&rcy;&iecy;&zhcy;&iecy;&ncy;&ncy;&ucy;&yucy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&kcy;&ucy;. &Pcy;&ocy;&dcy;&dcy;&iecy;&rcy;&zhcy;&kcy;&acy; &rcy;&acy;&zcy;&rcy;&iecy;&zhcy;&iecy;&ncy;&ncy;&ocy;&jcy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&kcy;&icy; &vcy;  <code>git read-tree</code>  &icy; &pcy;&ocy;&dcy;&ocy;&bcy;&ncy;&ycy;&khcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&acy;&khcy; &ocy;&tcy;&kcy;&lcy;&yucy;&chcy;&iecy;&ncy;&acy; &pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy;. &Vcy;&acy;&mcy; &ncy;&iecy;&ocy;&bcy;&khcy;&ocy;&dcy;&icy;&mcy;&ocy; &vcy;&kcy;&lcy;&yucy;&chcy;&icy;&tcy;&softcy;  <code>core.sparseCheckout</code> , &chcy;&tcy;&ocy;&bcy;&ycy; &icy;&mcy;&iecy;&tcy;&softcy; &rcy;&iecy;&dcy;&kcy;&ucy;&yucy; &pcy;&ocy;&dcy;&dcy;&iecy;&rcy;&zhcy;&kcy;&ucy; &ocy;&fcy;&ocy;&rcy;&mcy;&lcy;&iecy;&ncy;&icy;&yacy; &zcy;&acy;&kcy;&acy;&zcy;&acy;.</span></p> </div> <h2 class="text-body-emphasis"  id="_see_also"><span data-i18n="2fa97693b70fa87b95b2d1bdf9558e4ac65d5e82d145f13a03849c4d9c4957a9/40" data-source="See also" onmousemove="i18n(this)">See also</span></h2> <div> <p><span data-i18n="4fb15ffa7b77246496920ab3cf648708fff0ab287429bace788d90ed7aa943a0/9f" data-source="&lt;a href=&quot;git-write-tree&quot;&gt;git-write-tree[1]&lt;/a&gt;, &lt;a href=&quot;git-ls-files&quot;&gt;git-ls-files[1]&lt;/a&gt;, &lt;a href=&quot;gitignore&quot;&gt;gitignore[5]&lt;/a&gt;, &lt;a href=&quot;git-sparse-checkout&quot;&gt;git-sparse-checkout[1]&lt;/a&gt;" onmousemove="i18n(this)"><a href="git-write-tree.html">git-write-tree[1]</a> ,  <a href="git-ls-files.html">git-ls-files[1]</a> ,  <a href="gitignore.html">gitignore[5]</a> ,  <a href="git-sparse-checkout.html">git-sparse-checkout[1]</a></span></p> </div><address>
<p>
    &copy; 2012&ndash;2024 Scott Chacon and others<br/>Licensed under the MIT License.<br/>
<a href="https://git-scm.com/docs/git-read-tree">https://git-scm.com/docs/git-read-tree</a>
</p>
</address>                </article>
            </main>

            <br>
            <br>
            <hr>

                               <ins class="adsbygoogle"
        style="display:block"
        data-ad-format="autorelaxed"
        data-ad-client="ca-pub-6424571640879890"
        data-ad-slot="7867651344"></ins>
   <script>
        (adsbygoogle = window.adsbygoogle || []).push({});
   </script>            
        </div>

        <!-- -->

        <div class="col-md-3">
            <br>
            <form action="-index-.html">
                <div class="input-group">
                    <input class="form-control" type="search" name="q" placeholder="Search for Git" required>
                    <button class="btn btn-primary" type="submit">
                        <i class="bi bi-search"></i>
                    </button>
                </div>
            </form>
            <br>

                            <div class="list-group list-group-flush">
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-rebase.html">
                            git rebase                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-receive-pack.html">
                            git receive-pack                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-reflog.html">
                            git reflog                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-remote.html">
                            git remote                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-remote-ext.html">
                            git remote-ext                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-remote-fd.html">
                            git remote-fd                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-repack.html">
                            git repack                        </a>
                                    </div>
            
            <br>
            <div class="my-3">
                <ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-6424571640879890"
     data-ad-slot="3954319254"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>            </div>
            <br>

            
            
        </div>
    </div>
</div>    <!--/sse-->

    <footer>
        <br>
        <div class="container">
            <div class="row">
                <div class="col">
                    <hr>
                    <div class="row">
                        <div class="col-md-10">
                            <ul class="nav">
                                <li class="nav-item">
                                    <a class="nav-link ps-0" href="https://runebook.dev/">Help us Improve Translation</a>
                                </li>
                                                            </ul>
                        </div>
                        <div class="col-md-2 text-end">
                            <a href="git-read-tree.html#" class="fs-5" aria-label="Top">
                                <i class="bi bi-arrow-up-square-fill"></i>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <br>
    </footer>
    <script src="../../../runebook.js"></script>
</body>

</html>